# confidence intervals, calculating maximum sample size

This is a question from a sample mid-term for a first course in Statistics

Let p denote the proportion of elderly people with artificial hips. In an earlier study, the estimated proportion of the number of elderly people with artificial hips was found to be $11 \%$.

Q.1. Using earlier study's estimate, find the number of samples we would need in order to create a $95%$ confidence interval for the proportion of elderly people with artificial which is no more than $0.05$ away from the true proportion.

Ans. I have no clue how to do this. If could get the formula on how to approach this I would appreciate it.

Q.2. What is the maximum sample size needed to create a $93%$ confidence interval for the proportion of elderly people with artificial hips which is no more than $0.04$ away from the true proportion ? Ans I would appreciate a formula for this as well. Thanks

• How can a proportion be $11$? Apr 2 '13 at 9:06
• sorry it was 11% , it was a LAtex error on my part. Thanks for the answer I am just working it out and making sure I understand it. Apr 2 '13 at 9:34

The formula for the minimum required sample size is $$n=\frac{z^2\cdot p\cdot (1-p)}{d^2},$$ where $z=z_{\alpha/2}$ and $p$ is the true proportion and $d$ is half the length of the $(1-\alpha)\%$ confidence interval.
1. determine $\alpha$, e.g. if you're looking at $95\%$ confidence intervals, then set $\alpha=0.05$. This determines $z$,
2. find $d$ which is half the length of the confidence interval you want to obtain.
3. and then use the formula above with $p$ being replaced by some estimate (usually obtained by earlier studies or smaller pilot studies).
Often you're not explicitly given $d$ as half the length of the confidence interval, but rather as "create a $95\%$ confidence interval such that the estimated proportion is no more than $d$ away from the true proportion".