We now use a simulation to demonstrate that 95% confidence intervals obtained with the formula on the previous page do indeed include the population probability, π, in approximately 95% of samples.
Problems with small sample sizes
The confidence level of this type of confidence interval relies on about 95% of estimation errors being within 2 standard errors of zero. This may not hold when the sample size, n, is small or π is close to either 0 or 1.
A better confidence interval
There is a better way to construct a 95% confidence interval for π that is accurate even for small n. This accurate confidence interval is much harder to evaluate by hand and is too advanced for an introductory-level statistics course, but some statistical software will evaluate it for you.