Statistics › Section H · Confidence intervals › Topic H.5
Choosing the sample size
Every interval so far was computed after the data arrived. Sample-size planning runs the arithmetic the other way: state the margin you need, pick a level, and solve for n - the most practical question in the chapter, because it decides the budget.
Design before data
The coffee shop's 36 orders gave a margin of 1.31 minutes, and the voter poll's 400 people gave 4.9 points, but nobody chose those margins: they fell out of whatever sample happened to be taken. Planning reverses that, before the study: state the margin of error you need, pick a confidence level, and solve for \(n\). It is arguably the most practical question in this chapter - the answer decides the budget, the schedule, the staffing, and sometimes whether the study can run at all.
The logic: invert the margin
Every interval's margin has the shape \(z^*\) times a standard error, and the standard error carries the \(n\). Setting the margin equal to a target \(m\) and solving for \(n\) turns the formula around. No new theory appears - the planning formulas are the interval formulas, rearranged. That is worth knowing twice over: it demystifies the arithmetic, and it means every condition of the interval topics (randomness, independence, shape) is also a promise the finished study must keep.
Sample size for a proportion
Solving the proportion interval's margin for \(n\) gives
which needs a value for \(\hat{p}\) before any data exist. A prior estimate - a past poll, a pilot study - serves; with none, use \(\hat{p} = 0.5\), the conservative choice, because \(p(1-p)\) reaches its maximum of 0.25 there and the formula then demands the largest, safest \(n\). Any other \(\hat{p}\) risks under-buying if the truth lies nearer 0.5, so the honest default is the expensive one.
Worked example: the national poll
A polling firm wants a 3-percentage-point margin at 95% confidence, with no prior estimate. 1. Conservative \(\hat{p} = 0.5\), so \(\hat{p}(1-\hat{p}) = 0.25\). 2. \(n = \left(\frac{1.96}{0.03}\right)^2 \times 0.25 = (65.33)^2 \times 0.25 \approx 1067\). 3. Round up: 1,068 respondents. 4. Check: \(\sqrt{0.25/1068} \approx 0.0153\), and \(1.96 \times 0.0153 \approx 0.030\) - the margin comes out at 3 points, as ordered. This is why national polls so often report "about 1,000 respondents": the arithmetic of a 3-point margin forces it.
Worked example: the coffee study's size
For a mean with known \(\sigma\), the margin \(z^*\sigma/\sqrt{n}\) inverts to
The coffee shop (\(\sigma = 4\) minutes from long records) wants its mean delivery time known within 0.5 minutes at 95% confidence. 1. \(n = \left(\frac{1.96 \times 4}{0.5}\right)^2 = (15.68)^2 \approx 245.9\). 2. Round up: 246 orders. 3. Check by plugging back: \(1.96 \times 4/\sqrt{246} \approx 0.500\) - the promised margin, delivered exactly at the boundary. The planning needs a \(\sigma\): from past records, a pilot sample, or an engineering specification - without one, there is nothing to invert.
The quadratic price of precision
Both formulas are quadratic in the reciprocal margin: halve the target margin and \(n\) quadruples. The 3-point poll needs 1,068; a 1.5-point poll needs \((1.96/0.015)^2 \times 0.25 \approx 4268.4\), so 4,269 - four times the unrounded 1,067.1. The same law prices the coffee study: cutting the margin from 0.5 to 0.25 minutes would need \(4 \times 246 = 984\) orders. Precision is bought on a steep curve - the same square root that made standard errors shrink slowly now makes sample sizes explode. Deciding how much precision a decision actually needs is part of the statistics, and it usually deserves more thought than the study gets.
Round up, always
The formulas produce decimals; samples are integers. Always round up. Rounding to the nearest can leave the study one respondent short of its promised margin: \(n = 1067.1\) means 1,068, because 1,067 would deliver a margin a hair over 3 points. The rule is cheap insurance - the difference between 1,067 and 1,068 is negligible, but the difference between promising 3 points and delivering 3.001 is a broken promise, and reviewers notice.
Choosing the inputs honestly
The planning formulas consume three inputs: the level (which sets \(z^*\)), the margin (which sets \(m\)), and a spread - \(\sigma\) for means, \(\hat{p}\) for proportions. Guess wide, not narrow: a conservative \(\hat{p} = 0.5\) and a slightly inflated \(\sigma\) cost a bigger study but guarantee the margin. If past data give a genuine \(\hat{p} = 0.8\), the 3-point poll shrinks to \(\left(\frac{1.96}{0.03}\right)^2 \times 0.16 \approx 683\) respondents - real savings, honestly earned.
Common mistakes to avoid
First, rounding the computed \(n\) down - always up. Second, pairing a 90% \(z^*\) with a 95% promise: the level chooses the critical value before anything else. Third, inventing a convenient prior to under-buy, or ignoring a solid one and over-buying. Fourth, giving \(m\) in the wrong units: 0.5 minutes is not 0.5 hours. Fifth, assuming a larger population needs a larger sample - the formulas contain no population size at all. Sixth, forgetting that the planned study must still meet the interval conditions: a perfectly sized biased sample is still biased.
Key takeaways
Planning inverts the margin. For proportions, \(n = (z^*/m)^2\hat{p}(1-\hat{p})\), with \(\hat{p} = 0.5\) the no-prior conservative choice; for means with known \(\sigma\), \(n = (z^*\sigma/m)^2\). The 3-point, 95% poll needs 1,068 respondents - the arithmetic behind "about 1,000" - and halving any margin quadruples \(n\). Always round up. Population size does not appear in the formulas. And the finished study inherits every condition of the interval it was sized for: planning sizes the chance error, never the bias.
Flashcards
Flashcard
Sample size for a proportion
Test your understanding
Question 1 of 5
For a 3-percentage-point margin at 95% confidence, with no prior estimate of p, how many respondents does a poll need?
Question 2 of 5
With no prior estimate of p, the planning formula should use:
Question 3 of 5
Moving a poll's margin from 3 points to 1.5 points multiplies the required sample size by:
Question 4 of 5
A mean study has σ = 4 minutes and wants a 0.5-minute margin at 95% confidence. What n?
Question 5 of 5
The formula gives n = 1067.1. The study should sample:
