By Plainly Editorial

Updated

First published

What is sample size?

Filed under Data literacy

What is the difference between a sample and a population?

The population is the whole group you want to know about: every adult in a country, every customer of a shop, every question a chatbot might ever be asked. Measuring all of them is usually impossible or too expensive, so you measure a sample, a smaller group drawn from the population, and use it to estimate the bigger picture.

The sample size, usually written n, is simply how many cases are in that sample. A poll of 1,000 adults has n = 1,000. A benchmark with 100 test questions has n = 100.

The number you calculate from a sample (say, 52% of respondents prefer option A) is an estimate. If you drew a different random sample of the same size, you would get a slightly different number. Sample size tells you how much those numbers would bounce around.

Why do bigger samples give more precise results?

With a tiny sample, a few unusual cases can drag the result a long way. Imagine asking 5 people whether they like a new app: if 1 person changes their mind, the result jumps by 20 percentage points. Ask 1,000 people and one change moves the result by 0.1 points.

Statisticians describe this with the margin of error: a range around the estimate that, for a random sample, captures the true population value most of the time. The most common version uses 95% confidence, meaning that if you repeated the survey many times, about 95% of the ranges built this way would contain the true value.

The key fact is that the margin of error shrinks with the square root of n, not with n itself. Doubling the sample does not halve the error. To halve the error, you need four times as many cases.

How do you calculate the margin of error for a percentage?

For a proportion from a simple random sample, a standard approximation for the 95% margin of error is 1.96 × √(p(1 − p) / n), where p is the observed proportion and n is the sample size. The 1.96 comes from the normal distribution: about 95% of values fall within 1.96 standard errors of the centre.

The margin is largest when p = 0.5, so pollsters often quote that worst case. Worked through for n = 100: p(1 − p) = 0.5 × 0.5 = 0.25. Divide by 100 to get 0.0025. The square root is 0.05. Multiply by 1.96 to get 0.098, or about ±9.8 percentage points.

Repeat for larger samples and the pattern appears (see the table below). Going from 100 to 400 people cuts the margin from about ±9.8 to ±4.9 points, a big gain for 300 extra interviews. Going from 1,000 to 2,500 people, which costs 1,500 extra interviews, only moves it from about ±3.1 to ±2.0. A handy shortcut at p = 0.5 is that the margin is roughly 1 / √n: for n = 1,000 that is 1 / 31.6, about 3.2%.

Real surveys usually report somewhat wider margins than this formula gives, because weighting and complex sampling designs add extra uncertainty. Treat the simple formula as a floor, not a guarantee.

Can a big sample still give the wrong answer?

Yes. The margin of error only measures random sampling noise. It assumes the sample was drawn fairly from the population. If the way people got into the sample is skewed, a bigger sample just gives you a more confident wrong answer. That problem is called selection bias.

Picture two salary surveys. One gets 50,000 responses from readers of a careers website, who are mostly ambitious, online and well paid. The other randomly selects 1,000 workers from official records and follows up until most reply. The small random survey will usually describe typical pay far better, even though its margin of error looks wider on paper.

A big biased sample is often better than no data at all, because it can still reveal patterns worth checking. But it should lose to a smaller sample that was drawn properly, and it should never be presented with a tiny margin of error as if size had fixed the bias.

What is the difference between statistical and practical significance?

A result is statistically significant when it is unlikely to be explained by random sampling noise alone. Practically significant means the difference is big enough to matter in real life. The two are separate questions.

Huge samples make tiny differences statistically significant. A study of a million people might show that a supplement lowers blood pressure by a fraction of a unit with very high statistical confidence, yet no doctor would care about a change that small. Small samples do the opposite: a genuinely important effect can fail to reach significance simply because there were too few cases to see it clearly.

So when a headline says a finding is significant, ask two things: was the sample big enough to rule out noise, and is the size of the effect large enough to change any decision?

Is 92% vs 90% on an AI benchmark a real difference?

Often not. A benchmark is a sample of possible questions, so its score has a margin of error like any poll. Suppose, as an illustration, Model A scores 92% and Model B scores 90% on a 100-question test. That gap is just 2 questions.

Using the same formula at p = 0.9 and n = 100: 0.9 × 0.1 = 0.09; 0.09 / 100 = 0.0009; the square root is 0.03; times 1.96 gives about ±5.9 percentage points. Each score could plausibly sit anywhere in a band roughly 12 points wide, so a 2-point gap is well within the noise.

On a 1,000-question test at the same 90% score, the margin falls to about ±1.9 points, and on 10,000 questions to about ±0.6 points. That is why benchmark size matters, and why careful evaluations report confidence intervals or test on many questions. Even then, a large benchmark can mislead if its questions do not resemble your real tasks, or if models have seen the questions during training.

How big does a sample need to be?

It depends on how precise you need to be and how large the differences you care about are. If you only need to know whether roughly half or roughly a quarter of customers want a feature, a few hundred random responses is plenty. If you need to detect a 1-point change, you need many thousands.

Surprisingly, the size of the population barely matters once it is much larger than the sample. A random sample of 1,000 gives about the same precision for a city of 100,000 as for a country of 300 million. What matters is how many you sampled and how fairly.

Watch out for subgroups. A national poll of 1,000 might include only 100 or so people aged 18 to 24, so any figure about that group carries a margin closer to ±10 points than ±3.

Approximate 95% margin of error for a percentage near 50% (simple random sample, p = 0.5)

Sample size (n)√(0.25 / n)× 1.96 = margin of errorPlausible range if 50% answer yes
1000.0500±9.8 points40.2% to 59.8%
4000.0250±4.9 points45.1% to 54.9%
1,0000.0158±3.1 points46.9% to 53.1%
2,5000.0100±2.0 points48.0% to 52.0%
  • A poll of 40 people presented as what the country thinks: at p = 0.5 the margin is about ±15 points (1.96 × √(0.25 / 40) ≈ 0.155)
  • An A/B test declared a winner after 200 visitors when the conversion rates differed by under 1 point
  • A health headline about a treatment trialled on 12 patients with no comparison group
  • Two AI models scoring 92% and 90% on a 100-question benchmark, a gap of only 2 questions
  • A national survey of 1,000 quoting a figure for young adults based on roughly 100 respondents in that age group

Common questions

What is a good sample size for a survey?

For a general population poll, around 1,000 randomly selected respondents is a common choice because it gives a margin of about ±3 points at a reasonable cost. Smaller samples work for rough answers; larger ones are needed for precise estimates or for reporting on subgroups. Random selection matters more than hitting a magic number.

Why does quadrupling the sample only halve the margin of error?

Because the margin of error depends on the square root of the sample size. Multiplying n by 4 multiplies √n by 2, which divides the margin by 2. Going from 100 to 400 respondents takes the margin at 50% from about ±9.8 to about ±4.9 points.

Does the margin of error cover all mistakes in a poll?

No. It only covers random sampling error. It does not cover biased samples, leading question wording, people who refuse to answer, or respondents who give false answers. A poll can have a small margin of error and still be badly wrong if the sample is not representative.

What does 95% confidence actually mean?

It describes the method, not one result. If you repeated the same random survey many times and built a margin-of-error range each time, about 95% of those ranges would contain the true population value. Any single range either contains it or does not; you just cannot tell which.

If two results' margins of error overlap, is there no real difference?

Not necessarily. Overlapping ranges are a rough warning sign, not a formal test. A proper comparison uses the margin of error of the difference itself. As a quick check, though, if two estimates sit well inside each other's ranges, treat the gap as unproven.

Sources and further reading

  1. Selecting sample sizes (Section 3.3.3.3) — NIST/SEMATECH e-Handbook of Statistical Methods
  2. OpenIntro Statistics — OpenIntro
  3. 2023-24 Religious Landscape Study: sample sizes and margins of error — Pew Research Center

Glossary terms

Keep reading