A question about survey sample size I am looking at the formula on this page, it says the formula for estimating the sample size of a survey is:
$$Sample\;size = \frac{\frac{z^2 \;\times \;p(1-p)}{e^2}}{1 + (\frac{z^2 \; \times \; p(1-p)}{e^2N})}$$
where
- $e$ is the margin of error
- $N$ is the population size.
I have the following questions:


*

*What does $p$ represents?  

*Why is the variance of a Bernoulli distribution (i.e. $p(1-p)$) used here?

*Let's say


*

*N= 10,000 

*e=3% 

*confidence interval = 95%

*based on the numbers above, the sample size is 965



How would you interpret the result? I am 95% confident that by surveying 965 people, it will be enough to present the entire population? (what about the margin of error?)
 A: This sample size calculator seems to assume you're trying to determine the proportion of units in your population has a particular characteristic.


*

*$p$ represents the proportion in the population that has the characteristic you're studying. The calculator probably assumes $p=0.5$ since this gives the most conservative (largest) sample size.

*The variance of a Bernoulli random variable is used because each unit in the population is either has the characteristic you're studying or doesn't. If you're not just calculating proportions - for example if you're trying to estimate average height, then you replace the $p(1-p)$ with an estimate of the variance of the characteristic you're collecting (e.g. do some initial research to estimate the variance of heights in your population). 

*That result is saying that if you repeated the survey many times, then 95% of the time, the proportion of units in your survey that have that particular characteristic will be within about 3% of the true proportion in the population.
