01 / 20

Sample Size
Selection

Learn how to determine the minimum sample size needed to achieve a desired margin of error for confidence intervals.

College Statistics

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

\( z^* \) Critical Value
Determined by confidence level (e.g., 1.96 for 95%)
\( \hat{p} \) Proportion
Estimated proportion from prior data or pilot study
\( n \) Sample Size
The number of observations we plan to collect

Why Sample Size Matters

Sample Size (n) Margin of Error Diminishing returns n=50 n=500 Large E Small E

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

1
\( z^* \): critical value from the standard normal distribution for your confidence level.
2
\( E \): the desired margin of error (how close you want to be).
3
\( \hat{p} \): estimated proportion (use 0.5 if unknown, for maximum sample size).

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^* \)

90% Confidence
\( z^* = 1.645 \)
95% Confidence
\( z^* = 1.960 \)
99% Confidence
\( z^* = 2.576 \)

How to Determine \( n \)

1
Identify the parameter: Are you estimating a proportion \( p \) or a mean \( \mu \)?
2
Set the desired margin of error \( E \): How precise must the estimate be?
3
Choose the confidence level: Look up the corresponding \( z^* \) value.
4
Estimate variability: Use \( \hat{p} \) (or 0.5 if unknown) for proportions, or \( \sigma \) for means.
5
Plug into the formula and round up: Always round \( n \) to the next whole number.

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 \)?

\( E = 0.03 \)
\( n = 1,068 \)
baseline → halve E
\( E = 0.015 \)
\( n = 4,269 \)
4x larger!

Why \( \hat{p} = 0.5 \) is Conservative

\( \hat{p} \)
\( \hat{p}(1 - \hat{p}) \)
0 0.5 1.0 max = 0.25

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

✕ Rounding Down
If you get \( n = 384.2 \), the answer is \( n = 385 \), not 384. Always round up to ensure the margin of error is met.
✕ Forgetting the Square
The formula has \( (z^*/E)^2 \). Forgetting to square the ratio is a very common algebraic error.
✕ Using \( \hat{p} = 0 \) or \( 1 \)
If \( \hat{p} = 0 \) or \( 1 \), then \( \hat{p}(1-\hat{p}) = 0 \) and you'd get \( n = 0 \). Use 0.5 when truly uncertain.

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?