1. ## Probabilty of smoking

A fraction p of citizens in a city smoke. We are to determine the value of p by making a survey that involves n citizens whom we select randomly. If k of these n people smoke, then p'=k/n will be our result. How large should we choose n if we want our result p' to be closer to the real value p than 0.005 with probability at least 0.95? In other words: determine the smallest number $n_0$ such that:
$P(|p'-p|)\leq 0.005)\geq 0.95$, for any $p \in (0,1)$ and $n\geq n_0$.

Thank you very much in advance!

2. ## Re: Probabilty of smoking

A fraction p of citizens in a city smoke. We are to determine the value of p by making a survey that involves n citizens whom we select randomly. If k of these n people smoke, then p'=k/n will be our result. How large should we choose n if we want our result p' to be closer to the real value p than 0.005 with probability at least 0.95? In other words: determine the smallest number $n_0$ such that:
$P(|p'-p|)\leq 0.005)\geq 0.95$, for any $p \in (0,1)$ and $n\geq n_0$.

Thank you very much in advance!
We use the normal approximation, so under this approximation we have:

$(p'-p) \sim N(0,p(1-p)/n)$

Now the z-score corresponding to $(p'-p)=0.005$ is:

$z=\frac{0.005 n}{p(1-p)}$

and the critical value for a 2-sided 95% interval is $1.96$ so we find the largest $n$ such that:

$\frac{0.005 n}{p(1-p)}\le 1.96$

for any $p \in [0,1]$ (which will occur when $p=0.5$)

CB