Margin of Error and Sample Size

AP Statistics · Unit 3 — Inference for Categorical Data: Proportions

What moves the margin of error

$$\text{ME}=z^*\sqrt{\frac{\hat p(1-\hat p)}{n}}$$

Choosing n in advance

Set $z^*\sqrt{\frac{p^*(1-p^*)}{n}}\le \text{ME}$ and solve for $n$, using $p^*=0{,}5$ if no prior estimate exists. Always round up — rounding down leaves the margin larger than required.

Worked example: computing the required sample size

You want to estimate a proportion with a maximum margin of error of $3\%$ at the $95\%$ confidence level, with no prior estimate. What sample size is needed?

Solution

Use $p^*=0.5$ (the worst case) and $z^*=1.96$:

$$1.96\sqrt{\frac{0.25}{n}}\le0.03$$$$\sqrt{\frac{0.25}{n}}\le\frac{0.03}{1.96}=0.015306$$$$\frac{0.25}{n}\le0.0002343\ \Longrightarrow\ n\ge1067.1$$

Round up: $n=1068$.

This is why opinion polls often have sample sizes around $1000$–$1100$: it is just enough for a $3\%$ margin of error.

Common mistake

The margin of error does not account for bias. A voluntary response survey with $n=50\,000$ still gives a very small margin of error on paper, but that figure is meaningless because the formula assumes a random sample.

Key takeaway

High confidence ⇒ wide interval. Four times $n$ ⇒ half the width. For planning use $p^*=0.5$, and always round up.

← Confidence Intervals for a Proportion · All AP Statistics lessons · Practice AP Statistics questions (free, instant scoring) · Significance Tests for Proportions →