Inference for Numerical Data

5.jpg

We will be using the confidence formula stated in the OpenIntro book to find sample mean and standard deviation.

cif.jpg

  1. The t-value for population 36 has df=35 and by looking at the t-table 95% confidence level is 2.03.

5df.jpg

  1. The \(\bar{x}\) is the sample mean we need to find.

  2. The SE formula is se.jpg where \(\sigma\) is the unknown standard deviation.

  3. The margin of error me.jpg can be obtained by taking the difference of confidence intervals and then dividing it by half.
    \(ME = \frac{CI(upper) - CI(lower)}{2} = t*\frac{\sigma}{\sqrt{n}}\)

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.

13.jpg

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 = mez.jpg where SE is se.jpg 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.