Instant PDF download, name-and-email checkout. Complete Book Bundle: every Economics, Statistics, Mathematics and Econometrics book
Statistics

Margin of Error and Sample Size for a Proportion: How Many People Should You Survey?

Margin of error and sample size for a proportion: the formula, why n = 1,068 gives ±3 points, the square-root law and worked survey examples.

In 30 seconds
  • The margin of error is the “plus or minus” part of a confidence interval: \(z^* \sqrt{\hat{p}(1-\hat{p})/n}\) for a proportion.
  • It shrinks with the square root of the sample size, so halving the margin of error needs four times as many people.
  • To plan a survey, solve for \(n\): \(n = (z^*/E)^2\, p^*(1-p^*)\), and always round up. With no prior guess, use \(p^* = 0.5\).
  • The case answer: a student union that wants its result within ±4 points with 95% confidence must survey at least 601 students; ±3 points needs 1,068.
  • Exam point: the margin of error covers only random sampling error. It says nothing about bias from poor wording, non-response or convenience samples.

The case: how many students should the union survey?

A university student union wants to know what proportion of its 18,000 students support moving the library to 24-hour opening. Last year a quick poll of 600 students found 62% in favour. (The figures are illustrative.) This year the union wants to present the result to the university’s board, and the board has asked for a figure that is “accurate to within 3 percentage points”.

The union’s research officer has two jobs. First, she needs to explain what last year’s 62% actually told them, including its margin of error. Second, she needs to decide how many students to survey this year so that the result meets the board’s standard. Every extra student costs time, and the union has volunteers for only about 1,100 short interviews.

Is that enough? To answer, we need the margin of error formula, and then we need to turn it around to solve for the sample size.

The concept: margin of error for a proportion

When we estimate a population proportion \(p\) from a sample proportion \(\hat{p}\), the estimate is almost never exactly right. The sampling distribution of \(\hat{p}\) tells us how far off it typically is. A confidence interval turns that into a range: estimate plus or minus a margin.[1]

The margin of error is that “plus or minus” amount. It has two ingredients. The standard error measures how much \(\hat{p}\) varies from sample to sample. The critical value \(z^*\) sets how many standard errors we go out on each side, which depends on how confident we want to be. For 95% confidence, \(z^* = 1.96\); for 90%, 1.645; for 99%, 2.576.

Because the standard error has \(n\) under a square root, the margin of error falls as the sample grows, but more and more slowly. This “square-root law” is the reason national polls of 1,000 to 1,500 people are so common: beyond that, each extra interview buys very little extra precision.

Key termMargin of error: the largest distance, at a stated level of confidence, that we expect the sample estimate to be from the true population value because of random sampling alone. A 95% interval of \(62\% \pm 3.9\%\) means that the method used captures the true proportion in 95% of samples.
\[ E = z^* \sqrt{\frac{\hat{p}(1-\hat{p})}{n}} \qquad \Longrightarrow \qquad n = \left(\frac{z^*}{E}\right)^{2} p^*(1-p^*) \]

Here \(E\) is the margin of error, written as a proportion (0.03 for 3 percentage points). \(z^*\) is the critical value from the standard normal distribution for the chosen confidence level. \(\hat{p}\) is the sample proportion and \(n\) the sample size. In the planning formula on the right, \(p^*\) is a guess at the proportion before the survey is done. If you have no reliable guess, use \(p^* = 0.5\): the product \(p^*(1-p^*)\) is largest there (0.25), so the sample size you get is enough for any true \(p\). Always round \(n\) up to the next whole number, because rounding down would give a margin slightly bigger than \(E\).

Statistics Made Simple textbook coverStatistics Made Simple explains margin of error and sample size with worked examples, diagrams and tables.Get the textbook · $12

Why this method fits the case

The union is estimating a single proportion, “in favour of 24-hour opening”, from a random sample of students. That is exactly the setting for a one-proportion z interval. The board’s demand, “within 3 points”, is a margin of error target. The planning formula answers it directly.

The conditions match those for the sampling distribution of \(\hat{p}\):

  • Random: the union must sample at random from the student list, for example by drawing student ID numbers. A stall outside the library would over-represent library users.
  • 10% condition: 1,068 is about 5.9% of 18,000, so independence is reasonable.
  • Large Counts: with around 60% in favour, the expected numbers of “yes” and “no” are both in the hundreds.

When is this not the right tool?

  • When the sample is a large share of the population. If the union could survey half of all students, a finite population correction would make the margin smaller than this formula says.
  • When the main worry is bias, not random error. A larger sample does not fix a leading question or a 15% response rate. The margin of error does not measure these problems at all.
  • When you are estimating a mean. For an average, such as hours spent in the library, use \(n = (z^*\sigma/E)^2\) instead.

Setting it up

QuantitySymbolValue
Last year’s sample size\(n\)600
Last year’s sample proportion\(\hat{p}\)0.62
Confidence level / critical value\(z^*\)95% / 1.96
Target margin of error\(E\)0.03
Planning guess (safe)\(p^*\)0.5
Planning guess (from last year)\(p^*\)0.62
Population size\(N\)18,000

Two planning guesses are listed on purpose. Using last year’s 62% gives a smaller sample, but if opinion has moved towards 50% the margin would then be a little larger than promised. The safe guess of 0.5 guarantees the target.

Solving it

Worked example

Last year 62% of a random sample of 600 students supported 24-hour opening. Find the 95% margin of error and the confidence interval.

Step 1Standard error: \(\sqrt{0.62 \times 0.38 / 600} = \sqrt{0.0003927} \approx 0.01982\).
Step 2Margin of error: \(E = 1.96 \times 0.01982 \approx 0.0388\), about 3.9 percentage points.
Step 3Interval: \(0.62 \pm 0.0388\), i.e. from 0.581 to 0.659.

We are 95% confident that between 58.1% and 65.9% of all students supported the change last year. The margin of 3.9 points misses the board’s 3-point standard.

Now turn the formula around to plan this year’s survey.

Worked example

How many students must the union survey for a 95% margin of error of at most 3 percentage points? Use (a) \(p^* = 0.5\) and (b) \(p^* = 0.62\).

Step 1(a) \(n = (1.96/0.03)^2 \times 0.5 \times 0.5 = 4268.44 \times 0.25 = 1067.1\).
Step 2Round up: \(n = 1{,}068\).
Step 3(b) \(n = 4268.44 \times 0.62 \times 0.38 = 4268.44 \times 0.2356 \approx 1005.6\), so \(n = 1{,}006\).
Step 4Check (a): \(1.96\sqrt{0.25/1068} \approx 0.02999\), just under 0.03.

The safe answer is 1,068 students. The union’s capacity of about 1,100 interviews is enough, with a small cushion for refusals.

The third example shows how the confidence level and the target interact, which matters when the budget is tight.

Worked example

Using \(p^* = 0.5\), find the sample size needed for a margin of error of 3 points at (a) 90% confidence and (b) 99% confidence. Then find the 95% margin of error for samples of 600 and 2,400.

Step 1(a) \(n = (1.645/0.03)^2 \times 0.25 \approx 751.7\), so \(n = 752\).
Step 2(b) \(n = (2.576/0.03)^2 \times 0.25 \approx 1843.3\), so \(n = 1{,}844\).
Step 3\(n = 600\): \(E = 1.96\sqrt{0.25/600} \approx 0.040\), i.e. ±4.0 points.
Step 4\(n = 2{,}400\): \(E = 1.96\sqrt{0.25/2400} \approx 0.020\), i.e. ±2.0 points.

Going from 90% to 99% confidence more than doubles the sample. Quadrupling the sample from 600 to 2,400 halves the margin, exactly as the square-root law predicts.

Statistics Made Simple Practice Questions coverMake margin of error and sample size calculations automatic with the Practice Questions book: 1,569 questions, all fully worked.Get 1,569 questions · $9

What the answer tells us

Last year’s 62% came with a margin of about ±3.9 points, so the true level of support could reasonably have been anywhere from the high 50s to the mid 60s. That was enough to say “a clear majority” but not enough to meet the board’s ±3 standard. This year a random sample of 1,068 students will meet it for any level of support, and the union’s capacity just covers it.

Reasonableness check. A widely quoted rule of thumb is that the 95% margin of error with \(p\) near 0.5 is roughly \(1/\sqrt{n}\). For \(n = 1{,}068\), \(1/\sqrt{1068} \approx 0.031\), very close to our 0.030. For \(n = 600\), \(1/\sqrt{600} \approx 0.041\), close to the 0.040 we found. Our answers agree with the shortcut.

Sensitivity. Figure 1 shows how fast the margin falls at first and how slowly later. Going from 100 to 600 students cuts the 95% margin from 9.8 to 4.0 points. Going from 1,068 to 2,401 only cuts it from 3.0 to 2.0 points, at more than twice the cost. For many decisions, ±3 points is the sweet spot, which is why so many published opinion polls use samples of around 1,000.[2] The confidence level matters as much as the margin: insisting on 99% instead of 95% raises the required sample from 1,068 to 1,844.

Margin of error against sample size, p = 0.5 percentage points
95% confidence90% confidencePlanning targets
024681005001,0001,5002,0002,5003,000Sample size nn = 601, ±4.0n = 1,068, ±3.0n = 2,401, ±2.0
Figure 1. The margin of error falls with the square root of the sample size. Cutting it from ±4 to ±2 points means going from about 600 to about 2,400 people. Calculated from the formula with p* = 0.5.

One more check concerns what the margin does not cover. If only the most motivated students reply, or the question is worded as “Do you support better access to the library?”, the result can be several points off even with a perfect sample size. The research officer should spend some of her effort on a neutral question and on chasing non-respondents, not only on hitting 1,068.[3]

Common mistakeRounding the sample size down. If the formula gives 1,067.1, a sample of 1,067 gives a margin very slightly above 0.03 and does not meet the target. Sample sizes are always rounded up, even when the decimal is small.
Common mistakeWriting the margin as a percentage in the formula. If you put \(E = 3\) instead of \(E = 0.03\), the sample size comes out as about 0.1, which is obviously wrong. Keep proportions as decimals throughout, then convert to percentage points at the end.
Exam tipIn a sample size question, show the inequality, the substitution and the rounding: “\(1.96\sqrt{0.25/n} \le 0.03\), so \(n \ge 1067.1\), so \(n = 1{,}068\).” State why you used \(p^* = 0.5\) if no estimate is given (“it gives the largest required sample”). Confidence intervals for a proportion are a standard topic in AP Statistics, and the margin of error idea also underpins IB and university introductory courses.[4] Our statistics guide puts this step in context.

The Statistics Made Simple textbook explains confidence intervals for proportions from first principles, with diagrams of the sampling distribution and the margin of error. The Statistics Made Simple Practice Questions book gives you graded interval and sample-size problems with full solutions.

Statistics Made Simple bundle coverMaster confidence intervals and survey planning with both Statistics Made Simple books for $16.Both books · $16

Practice questions

Use \(z^* = 1.645\) for 90%, 1.96 for 95% and 2.576 for 99% confidence.

EasyQ1. In a random sample of 400 shoppers, 30% used a discount code. Find the 95% margin of error. Show worked answer
\(SE = \sqrt{0.3 \times 0.7/400} \approx 0.02291\).
\(E = 1.96 \times 0.02291 \approx 0.0449\), about ±4.5 percentage points.
EasyQ2. With no prior estimate, how large a sample is needed for a 95% margin of error of 5 percentage points? Show worked answer
\(n = (1.96/0.05)^2 \times 0.25 = 384.16\).
Round up: \(n = 385\).
MediumQ3. A health researcher believes about 10% of adults in a region have a particular allergy. How many adults should she sample for a 95% margin of error of 2 percentage points? How many would she need with no prior estimate? Show worked answer
With \(p^* = 0.1\): \(n = (1.96/0.02)^2 \times 0.1 \times 0.9 = 9604 \times 0.09 = 864.36\), so \(n = 865\).
With \(p^* = 0.5\): \(n = 9604 \times 0.25 = 2401\).
A good prior guess far from 0.5 saves a lot of interviews.
MediumQ4. A poll of 1,200 voters finds 45% support a candidate. Find a 95% confidence interval. Can the poll conclude that support is below 50%? Show worked answer
\(SE = \sqrt{0.45 \times 0.55/1200} \approx 0.01436\); \(E = 1.96 \times 0.01436 \approx 0.0281\).
Interval: 0.422 to 0.478.
The whole interval lies below 0.50, so the poll gives convincing evidence that support is below 50%.
ExamQ5. A company wants to estimate the proportion of its customers who would buy a new product. (a) Find the minimum sample size for a 99% margin of error of at most 0.02, with no prior estimate. [3] (b) A pilot study suggests the proportion is about 0.45. Find the new minimum sample size for a 95% margin of error of at most 0.02. [2] (c) Give one reason why the true error may be larger than the margin of error. [1] Show worked answer
(a) \(2.576\sqrt{0.25/n} \le 0.02\) [M1]; \(n \ge (2.576/0.02)^2 \times 0.25 = 4147.4\) [A1]; \(n = 4{,}148\) [A1].
(b) \(n \ge (1.96/0.02)^2 \times 0.45 \times 0.55 = 2376.99\) [M1]; \(n = 2{,}377\) [A1].
(c) Any valid source of bias, e.g. non-response, or customers saying they would buy but not doing so [B1].

Frequently asked questions

Does a bigger population need a bigger sample?

Hardly at all, as long as the sample is a small fraction of the population. The formula for the margin of error does not include the population size. A random sample of 1,068 gives about ±3 points whether the population is 18,000 students or 50 million voters. Only when the sample is more than about 10% of the population does a correction make the margin noticeably smaller.

Why use 0.5 when I have no estimate?

The term \(p(1-p)\) reaches its maximum of 0.25 when \(p = 0.5\). Using 0.5 therefore gives the largest sample you could ever need for that margin and confidence level. Whatever the true proportion turns out to be, the actual margin will be no bigger than planned.

What does “95% confident” actually mean?

It describes the method, not one particular interval. If we repeated the survey many times and built an interval each time, about 95% of those intervals would contain the true proportion. Our posts on how to interpret a confidence interval and confidence intervals explained go into the wording in more depth.

Why do news reports quote a single margin of error for a whole poll?

Pollsters usually quote the maximum margin, worked out with \(p = 0.5\), so that it covers every question in the poll. For a question where the answer is far from 50%, the actual margin is smaller. For subgroups, such as only young voters, the sample is smaller and the margin is larger, often much larger.

References

  1. Illowsky, B. and Dean, S. (2023) Introductory Statistics 2e. Houston, TX: OpenStax. https://openstax.org/details/books/introductory-statistics-2e
  2. Agresti, A., Franklin, C. and Klingenberg, B. Statistics: The Art and Science of Learning from Data. Boston: Pearson.
  3. Moore, D. S., McCabe, G. P. and Craig, B. A. Introduction to the Practice of Statistics. New York: W. H. Freeman.
  4. College Board. AP Statistics Course and Exam Description. New York: College Board.
Statistics Made Simple Complete Bundle cover showing both the textbook and practice book
This topic has a full chapter in Statistics Made Simple, with 1,569 worked practice questions in the bundle.Statistics Made Simple Complete Bundle — Textbook + 1,569 Practice Questions
Get it for $16
E

The EconTutorials team writes clear, exam-focused lessons in economics and statistics for A-Level, IB, AP and university students, with more than 13 years of classroom teaching behind every guide and book in the Made Simple series.