Which of the following vectors is orthogonal to \(\vec{v} = \lbrace -1,3,0 \rbrace\) and has a magnitude of \(\sqrt{19}\)?
We will test each answer choice below to determine orthogonality and determine which vector has the specified magnitude.
First, we will definte our vector \(\vec{v}\) and magnitude of \(\sqrt{19}\).
our_vector <- c(-1,3,0)
our_magnitude <- sqrt(19)
cat("Our vector:",our_vector,"\n")
## Our vector: -1 3 0
cat("Our magnitude:",our_magnitude,"\n")
## Our magnitude: 4.358899
A. \(\lbrace 3,1,0 \rbrace\)
# install.packages("pracma")
library(pracma)
A <- c(3,1,0)
if (dot(our_vector,A) == 0 & Norm(A) == our_magnitude) {
cat("Answer choice A is correct.")
} else {
cat("Answer choice A is incorrect.","\n")
cat("Dot Product:",dot(our_vector,A),"\n")
cat("Magnitude:",Norm(A),"\n")
}
## Answer choice A is incorrect.
## Dot Product: 0
## Magnitude: 3.162278
B. \(\lbrace 1,3,3 \rbrace\)
# install.packages("pracma")
library(pracma)
B <- c(1,3,3)
if (dot(our_vector,B) == 0 & Norm(B) == our_magnitude) {
cat("Answer choice B is correct.")
} else {
cat("Answer choice B is incorrect.","\n")
cat("Dot Product:",dot(our_vector,B),"\n")
cat("Magnitude:",Norm(B),"\n")
}
## Answer choice B is incorrect.
## Dot Product: 8
## Magnitude: 4.358899
C. \(\lbrace 3,1,3 \rbrace\)
# install.packages("pracma")
library(pracma)
C <- c(3,1,3)
if (dot(our_vector,C) == 0 & Norm(C) == our_magnitude) {
cat("Answer choice C is correct.")
} else {
cat("Answer choice C is incorrect.","\n")
cat("Dot Product:",dot(our_vector,C),"\n")
cat("Magnitude:",Norm(C),"\n")
}
## Answer choice C is correct.
D. \(\lbrace 6,2,1 \rbrace\)
# install.packages("pracma")
library(pracma)
D <- c(6,2,1)
if (dot(our_vector,D) == 0 & Norm(D) == our_magnitude) {
cat("Answer choice D is correct.")
} else {
cat("Answer choice D is incorrect.","\n")
cat("Dot Product:",dot(our_vector,D),"\n")
cat("Magnitude:",Norm(D),"\n")
}
## Answer choice D is incorrect.
## Dot Product: 0
## Magnitude: 6.403124
We find that answer choice C is correct.
The ages of domesticated cats are normally distributed with mean 15.7 years. A sample of twenty-five cats in a town were studied and the mean lifetime was found to be 16.5 years with a standard deviation of 1.6 years. If the lifetimes of domesticated cats follows a Normal distribution and the population mean is denoted by \(\mu\), test the following null and alternative hypotheses at the 1% level: \(H_0: \mu = 15.7\), \(H_1: \mu \neq 15.7\).
t.test(x = rnorm(n = 25,mean = 16.5,sd = 1.6),
mu = 15.7,
alternative = "two.sided",
conf.level = 0.01)
##
## One Sample t-test
##
## data: rnorm(n = 25, mean = 16.5, sd = 1.6)
## t = -0.044829, df = 24, p-value = 0.9646
## alternative hypothesis: true mean is not equal to 15.7
## 1 percent confidence interval:
## 15.68120 15.68948
## sample estimates:
## mean of x
## 15.68534
Will, Yvette, and Zac are siblings.
Will says: “Five times my age minus two times Yvette’s age minus four times Zac’s age equals 27 years.”
Yvette says: “My age plus two times Will’s age minus three times Zac’s age equals 21 years.”
Zac says: “My age plus three times Will’s age minus three times Yvette’s age equals 30 years.”
How old is Will, Yvette, and Zac?
In order to solve this problem, we will need a few things. This includes variables and direct word-to-number translation for a system of equations.
Let \(W\) be Will’s age, \(Y\) be Yvette’s age, and \(Z\) be Zac’s age.
Will’s statement: \(5W - 2Y - 4Z = 27\) (direct translation of Will’s statement)
Yvette’s statement: \(Y + 2W - 3Z = 21\) (direct translation of Yvette’s statement)
Zac’s statement: \(Z + 3W - 3Y = 30\) (direct translation of Zac’s statement)
Summarize our system of equations…
\[5W - 2Y - 4Z = 27 \\ 2W + Y - 3Z = 21 \\ 3W - 3Y + Z = 30\]
I rearranged some of the terms to align with a data frame to get our answer.
q3_data <- data.frame(W = c(5,2,3), # W-coefficients
Y = c(-2,1,-3), # Y-coefficients
Z = c(-4,-3,1), # Z-coefficients
TOTALS = c(27,21,30)) # TOTALS: right-hand side of each equation
q3_model <- lm(TOTALS ~ . - 1,data = q3_data) # finding our coefficients
coef(q3_model) # extracting model coefficients
## W Y Z
## 21 15 12
We find that Will’s age is 21, Yvette’s age is 15, and Zac’s age is 12.
What is \(\int e^x dx\)?
# install.packages(c("ggformula","mosaicCalc"))
library(ggformula)
## Warning: package 'ggformula' was built under R version 4.5.2
## Loading required package: ggplot2
## Loading required package: scales
## Loading required package: ggiraph
## Warning: package 'ggiraph' was built under R version 4.5.2
## Loading required package: ggridges
## Warning: package 'ggridges' was built under R version 4.5.2
##
## New to ggformula? Try the tutorials:
## learnr::run_tutorial("introduction", package = "ggformula")
## learnr::run_tutorial("refining", package = "ggformula")
library(mosaicCalc)
## Warning: package 'mosaicCalc' was built under R version 4.5.2
## Registered S3 method overwritten by 'mosaic':
## method from
## fortify.SpatialPolygonsDataFrame ggplot2
##
## Attaching package: 'mosaicCalc'
## The following object is masked from 'package:stats':
##
## D
f <- makeFun(exp(x) ~ x)
anti_f <- antiD(f(x) ~ x)
anti_f
## function (x, C = 0)
## exp(x) + C