Sample Size
Selection
Learn how to determine the minimum sample size needed to achieve a desired margin of error for confidence intervals.
What is Margin of Error?
When we estimate a population parameter from a sample, the margin of error tells us how far our estimate could plausibly be from the true value. A smaller margin of error means a more precise estimate.
The Key Players
Why Sample Size Matters
As sample size \( n \) increases, margin of error \( E \) decreases: but the relationship is not linear. Doubling precision requires quadrupling the sample size.
The Sample Size Formula for Proportions
Sample Size for Means
When estimating a population mean, you need an estimate of the population standard deviation \( \sigma \). This typically comes from a prior study, a pilot sample, or a reasonable guess.
Proportions vs Means
| Proportions | Means | |
|---|---|---|
| Formula | \( n = \left(\frac{z^*}{E}\right)^2 \hat{p}(1-\hat{p}) \) | \( n = \left(\frac{z^* \sigma}{E}\right)^2 \) |
| Variability term | \( \hat{p}(1-\hat{p}) \) | \( \sigma^2 \) |
| When unknown | Use \( \hat{p} = 0.5 \) | Estimate \( \sigma \) from prior data |
| Produces largest \( n \) | At \( \hat{p} = 0.5 \) | When \( \sigma \) is large |
Common Critical Values \( z^* \)
How to Determine \( n \)
Example 1: Voter Poll
A pollster wants to estimate the proportion of voters who support a candidate with a 95% confidence level and a margin of error of \( E = 0.03 \). No prior estimate of \( \hat{p} \) is available.
Example 2: Estimating a Mean
A researcher wants to estimate the mean weight of a species of fish within \( E = 5 \) grams at 99% confidence. A pilot study suggests \( \sigma = 20 \) grams.
Example 3: Halving the Margin of Error
Using the voter poll setup (95% confidence, \( \hat{p} = 0.5 \)), what happens if we want \( E = 0.015 \) instead of \( E = 0.03 \)?
Why \( \hat{p} = 0.5 \) is Conservative
The product \( \hat{p}(1-\hat{p}) \) is maximized at \( \hat{p} = 0.5 \), producing the largest (most conservative) sample size. When you have no prior information, this guarantees your margin of error will be at most \( E \).
Common Mistakes
Quick Reference Table
| Scenario | Effect on \( n \) | Reason |
|---|---|---|
| Decrease \( E \) | \( n \) increases | More precision needs more data |
| Increase confidence | \( n \) increases | Larger \( z^* \) widens interval |
| Larger \( \sigma \) or \( \hat{p}(1-\hat{p}) \) | \( n \) increases | More variability needs more data |
| Double \( E \) | \( n \) is quartered | \( n \propto 1/E^2 \) |
| Halve \( E \) | \( n \) is quadrupled | \( n \propto 1/E^2 \) |
Question 1 of 5
A researcher wants a 95% confidence interval for a proportion with \( E = 0.04 \). No prior estimate exists. What sample size is needed?
Question 2 of 5
If you halve the margin of error while keeping everything else constant, how does the required sample size change?
Question 3 of 5
When estimating a population mean with 99% confidence, \( \sigma = 15 \), and \( E = 3 \), what is the minimum sample size?
Question 4 of 5
Why do we use \( \hat{p} = 0.5 \) when no prior estimate of the population proportion is available?
Question 5 of 5
A 90% confidence interval for a proportion is desired with \( E = 0.05 \) and \( \hat{p} = 0.3 \). What is the required sample size?