We will be using the confidence formula stated in the OpenIntro book to find sample mean and standard deviation.
The \(\bar{x}\) is the sample mean we need to find.
The SE formula is where \(\sigma\) is the unknown standard deviation.
From the above, we can say
Standard deviation is \(\sigma\) = \(\frac{\sqrt{n} * margin\_of\_ error}{t}\) derived from \(margin\_of\_error = t*\frac{\sigma}{\sqrt{n}}\)
Mean is \(\bar{x}\) = CI(lower) + margin of error
# sample population
n <- 36
# t value for 95% confidence level
dfv <- 2.03
# confidence intervals
ci = c(18.985, 21.015)
# margin of error
me = (ci[2]-ci[1])/2
# Mean
m = ci[1] + me
# standard deviation
sd = (sqrt(36) * me)/dfv
c("mean" = m, "sd"=sd)
## mean sd
## 20 3
The mean is 20 and standard deviation is 3 for this sample.
Let’s write out the information provided:
Standard deviation: 100
Margin of Error: <= 10
For a large sample, margin of error can be computed as:
ME =
where SE is
and z is 1.96
z x SE \(\leq\) 10
z x \(\frac{\sigma}{\sqrt{n}}\) \(\leq\) 10
fill in the known values \(\sigma\) = 100, z=1.96
1.96 x \(\frac{100}{\sqrt{n}}\) \(\leq\) 10
\(1.96^2\) x \(\frac{100^2}{\sqrt{n}^2}\) \(\leq\) \(10^2\)
3.8416 x \(\frac{10000}{n}\) \(\leq\) 100
\(\frac{10000}{n}\) \(\leq\) \(\frac{100}{3.8416}\)
\(\frac{10000}{26.03082}\) \(\leq\) n
n \(\geq\) \(\frac{10000}{26.03082}\)
n \(\geq\) 384.16
We would need a sample size of at least 385.