7.3 Sample Size Calculation for a Proportion
A confidence interval for a population proportion p and q = 1 – p, with specific margin of error E is given by:
Note: If the sample size is determined before the sample is selected, the p* and q* in the above equation are our best guesses. Often times statisticians will use p* = q* = 0.5; this takes the guesswork out of determining p* and provides the “worst case scenario” for n. In other words, if p* = 0.5 is used, then you are guaranteed that the margin of error will not exceed E but you also will have to sample the largest possible sample size. Some texts will use p or π instead of p*.
Note the sample sizes of 842 and 1,068. If you have a prior knowledge about the sample proportion then you may not have to sample as many people to get the same margin of error. The larger the sample size, the smaller the confidence interval.
Adapted from Mostly Harmless Statistics by Rachel Webb (Portland State University), hosted on LibreTexts (stats.libretexts.org) and licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.