Choosing Sample Size for Desired Margin of Error
You'll learn how to calculate the sample size needed to achieve a target margin of error at a specific confidence level.
The Core Idea
When constructing a confidence interval for a population mean (with known σ), you've seen that the margin of error is:
E = z* × (σ / √n)
where z* is the critical value for your confidence level, σ is the population standard deviation, and n is the sample size.
Often in practice, you want to control how precise your estimate is. For example, you might need to estimate average customer wait time within ±2 minutes with 95% confidence. This requires choosing your sample size before collecting data.
The Formula
To find the required sample size, solve the margin of error formula for n:
n = (z × σ / E)²*
You need three inputs:
- Desired margin of error (E): How precise you want to be
- Confidence level: Determines
z*(e.g., 1.96 for 95%) - Population standard deviation (σ): Often estimated from prior studies or a pilot sample
Always round up to the next whole number, since you can't survey a fraction of a person!
Example
Suppose you want to estimate mean income with margin of error 3,000 from past data. Here, z* = 2.576 (for 99%), so:
n = (2.576 × 3000 / 500)² = (15.456)² ≈ 238.9
Round up: you need n = 239 people.
Key Takeaway: To achieve a desired margin of error at a given confidence level, calculate the required sample size using n = (z × σ / E)²* and always round up to ensure you meet or exceed your precision goal.