Estimating Sample Sizes for Proportions

Use the margin of error formula for a one-proportion confidence interval to determine the minimum sample size needed to achieve a desired precision at a given confidence level. Covers the case where a prior estimate of the proportion is available, the conservative case where it is not, and the use of pilot studies.

Step 1 of 157%

Tutorial

Sample Size for a Proportion

A confidence interval for a population proportion pp has margin of error

E=zp^(1p^)n,E = z^{*} \sqrt{\dfrac{\hat{p}(1-\hat{p})}{n}},

where zz^{*} is the critical value for the chosen confidence level and p^\hat{p} is the sample proportion.

When planning a study, we fix the desired margin of error EE and solve for the required sample size nn:

n=(zE)2p^(1p^).n = \left(\dfrac{z^{*}}{E}\right)^{2} \hat{p}(1-\hat{p}).

Because nn must be a whole number and the margin of error must be at most EE, we always round up to the next integer.

The most common critical values are:

  • 90%90\% confidence: z=1.645z^{*} = 1.645
  • 95%95\% confidence: z=1.96z^{*} = 1.96
  • 99%99\% confidence: z=2.576z^{*} = 2.576

For example, suppose past data suggest p^=0.4\hat{p} = 0.4 and we want a margin of error of 0.050.05 at 95%95\% confidence. Then

n=(1.960.05)20.40.6=1536.640.24=368.79,n = \left(\dfrac{1.96}{0.05}\right)^{2} \cdot 0.4 \cdot 0.6 = 1536.64 \cdot 0.24 = 368.79,

so we round up to n=369n = 369.

navigate · Enter open · Esc close · ⌘K/Ctrl K toggle