12.1.17 random sample confidence interval

A poll found that 59% of a random sample of 1058 adults said that they believe in ghosts.


(a). Determine the margin of error for a​ 99% confidence interval. (Round to three decimal places as​ needed.)

First, we need to get the data from the question. \(\hat{p} = .59\)

n = 1058
p = .56

Since confidence level is .99, \(\alpha = 1 - .99 = .01\). So \(\alpha/2=.01/2\)

We can find \(z_{\alpha/2}\) by using qnorm()

alpha = .01
zalpha2= abs(qnorm(alpha/2))

We can find the margin of error for a​ 99% confidence interval by using the formular \(E=z_{\alpha/2}.\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}\)

E = zalpha2 * sqrt(p*(1-p)/n)
E
## [1] 0.03930924

Round to three decimal places

round(E, 3)
## [1] 0.039


(b). Without doing any​ calculations, indicate whether the margin of error is larger or smaller for a​ 90% confidence interval.

If we change the confidence level from 99% to 90%, our \(z_{\alpha/2}\) will become smaller since alpha increases. From the formular, we can see that margin of error E will decrease.



Hope that helps!