Homework 1

Author

Jack Dumanski

For the problems in which calculations are needed, please include your R code, otherwise you will not be given full credit. Please upload your solution as an pdf or html file by Friday, September 5 at 11:59 pm under the assignments tab in Sakai.

  1. Assume that \(X \sim \mathcal{N}(24,25)\).
1 - pnorm(10, 24, 25)
[1] 0.7122603
qnorm(0.65, mean = 24, sd = 25)
[1] 33.63301
  1. \(F_{a,b}\) is a random variable from the \(F\)-distribution with \(df1 = a\) and \(df2 = b\).
pf(5.98, 2, 37)
[1] 0.9943809
qf(0.2, 9, 16)
[1] 0.5731567
#check
pf(0.5732, 9, 16)
[1] 0.2000329
  1. Given a dataset of scores \(\{10,15,49,34,16,25,47,55,66,3,15,46,68\}\), calculate the mean, median, and variance. (Hint: the command c() creates a vector in R).
scores = c(10, 15, 49, 34, 16, 25, 47, 55, 66, 3, 15, 46, 68)
mean(scores)
[1] 34.53846
median(scores)
[1] 34
var(scores)
[1] 484.9359
  1. A random sample of 40 persons attending a certain diet clinic was found to have lost an average of 18 pounds over a three week period, with a sample standard deviation of 6 pounds. For these data
xbar <- 18
s <- 6
n <- 40
alpha <- 0.05
crit <- qt(1-alpha/2, n-1)
CI <- xbar + c(-1, 1) * crit * s / sqrt(n)
CI
[1] 16.08111 19.91889
#We are 95% confident that the true mean weight loss (lbs.) over 3 weeks is between 16.08 and 19.92. 

No, with this confidence interval, there is evidence to reject H0 , as 15 is not contained in the interval, and we cannot fail to reject H0 if the value we’re testing against is not in the interval. The proper conclusion to make is to reject H0 , as there is statistically significant evidence that the true mean weight loss is different than 15 lbs.

  1. The dataset mice available directly in the R package datarium contains information about the weight, in grams, of 10 randomly selected lab mice. Suppose we believe that the average weight of this species of mice is 25 g. We would like to perform a t-test to determine if the average weight is different than 25 g.

H0 : 𝜇 = 25 g, Ha : 𝜇 ≠ 25 g

We are 95% sure at the ⍺ = 0.05 level that the true average weight of this species of mice is different than 25g since p < ⍺ (0.00001995 < 0.05)