The following simulation shows that 95% confidence intervals obtained with the formula on the previous page do indeed include the population probability, π, in approximately 95% of samples.

Demonstration of the properties of a 95% CI

Categorical samples are randomly selected from a population with probability 0.6 of success.

Click Take sample a few times and observe that the 95% confidence intervals vary from sample to sample.

Next, click the checkbox Accumulate and take more samples to accumulate a display of 100 or more confidence intervals on the right of the diagram. Observe that approximately 95% of these intervals include the population probability of success, 0.6.

Problems with small sample sizes

The confidence level of this type of confidence interval relies on about 95% of errors being within 2 standard errors of zero. This is true when the error distribution is approximately normal, but the error distribution can be far from normal when the sample size, n, is small or π is close to either 0 or 1.

The confidence level can be considerably less than 95% if n is small or π is close to either 0 or 1.

Guidelines

There is no hard cut-off for the sample size needed to use this type of confidence interval for a proportion — the confidence level gradually becomes closer to 95% as n increases. However many textbooks give the following guideline for using the confidence interval.

Only use the confidence interval for π when all of the following hold...
  n  >  30
np  >  5
 n(1-p)  >  5

These guidelines are fairly conservative and it is acceptable to use the confidence interval for slightly smaller sample sizes than recommended above.

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.