Samples and Populations

A few thousand people can speak for a hundred million — if chance picks them. Sampling distributions, the square-root law, and the 1936 poll of 2.4 million that got it wrong

Samples and Populations

You cannot ask everyone. Statistics rests on a surprising fact: a sample chosen by chance tells you about the whole, with an error you can calculate before you collect a single answer. A sample chosen any other way can be enormous and still wrong.

The Sampling Distribution

Press Step to watch one sample fall out of the population and its mean drop into the pile, then press + 1,000. Redraw the population with your pointer, change n, and switch the statistic to Maximum.

Population
Statistic
300
samples drawn
2.726
the truth: μ
2.715
average of the sample means
0.337
their spread (standard deviation)
0.337
σ/√n, the standard error of a mean
1.00
spread ÷ (σ/√n)
The 300 sample means centre on 2.71, and the population mean is 2.73. Their spread is 0.337; theory says σ/√n = 1.68/√25 = 0.337. The pile follows the dashed bell curve, whatever shape you gave the population.

Slate-white, top: the population, with its mean μ dashed. This is the truth, which a statistician never sees. Teal: one sample of n values drawn at random from it. Amber: the statistic computed from that sample, and below, the pile of that statistic over every sample so far. That pile is the sampling distribution. For the mean the dashed curve is the normal distribution with mean μ and standard deviation σ/√n; for the maximum it is the exact density n F(x)n−1 f(x). A new population, sample size or statistic starts a new pile of 300 samples; Reset starts an empty one with a new seed.

Go deeper:Three Distributions, the Standard Error, and Where the Bell Comes From

Three different distributions are on the screen, and most confusion about statistics comes from merging them. The population is the distribution of single values, with mean μ and standard deviation σ; it is fixed and usually unknown. The sample is the n values you happened to draw; it looks roughly like the population, with its own mean x̄ and standard deviation s. The sampling distribution is the distribution of a statistic such as x̄ over every sample you might have drawn. In practice you see one sample and so one value from it; the simulation shows the rest.

For n independent draws the sample mean has expected value μ and standard deviation σ/√n, whatever the shape of the population, provided σ is finite. That standard deviation is called the standard error of the mean. It is exact, not an approximation, and it says how far x̄ typically lands from μ. The central limit theorem adds the shape: as n grows, the distribution of x̄ approaches a normal curve with that mean and that spread. How large n must be depends on the population. One that is already roughly bell-shaped needs only a handful of values; a strongly skewed one, or the Wild preset with its far lump, needs many more. See also the Probability module’s lesson on the central limit theorem.

The theorem is about sums and averages. Other statistics have sampling distributions too, but each must be worked out for itself. The sample median is approximately normal for large n, with a standard error that depends on the height of the density at the population median; for normal data it is about 1.2533 σ/√n, where 1.2533 is √(π/2), so the median is a little noisier than the mean there. The sample maximum is not approximately normal at all. If F is the population’s cumulative distribution and f its density, the largest of n values has density n F(x)n−1 f(x), which piles up against the upper edge of the population and always falls short of it.

A Poll of Millions

You are the pollster. Take a random sample, run the mail-in poll, and press Play to repeat both; then reveal the truth. Try to rescue the mail-in poll by mailing more ballots.

Show on the map
Random sample

True support for A: hidden. Reveal it to see who was right, and to change it.

Mail-in poll
Methodanswerslatest estimate for Astated margin of errorbias of the methodintervals containing the truth
Random sample1,00062.9%± 3.0 pointshiddenhidden
Mail-in poll2,409,35543.6%± 0.06 pointshiddenhidden
The random sample of 1,000 puts A on 62.9%, give or take 3.0 points, and calls the election for A. The mail-in poll, with 2.4 million replies, puts A on 43.6%, give or take 0.06, and calls it for B. The two intervals do not overlap, so at least one method is broken. Repeat both a few times, then reveal the truth.

A simulated electorate of 40 million voters, drawn as 100,000 specks; its numbers are chosen to echo 1936, not to reconstruct it. Sky blue: an answer for candidate A. Orange: an answer for candidate B. In the strips each row is one whole poll: its estimate with the pollster’s 95% margin of error, 1.96 √(p̂(1 − p̂)/n), in amber until the truth is revealed, then green if the interval contains the truth and rose if it misses. The bias of the mail-in poll is computed from the list and the reply rates, not measured from the simulated polls. Mail-in polls are simulated with binomial counts, not ballot by ballot.

Go deeper:The Literary Digest, 1936: Bias Does Not Average Away

In 1936 the magazine The Literary Digest mailed about ten million mock ballots for the American presidential election and got about 2.4 million back. They predicted that Alf Landon would win with 57% of the vote. Franklin Roosevelt won with about 61% and carried 46 of the 48 states. George Gallup, with a sample of about 50,000, predicted Roosevelt’s win.

Two things went wrong, and the demo has a control for each. The Digest’s mailing list came from its own subscribers, telephone directories and car registrations, which in 1936 described people wealthier than the electorate as a whole. That is selection bias: some voters were far likelier than others to be asked. Then only about a quarter of those asked replied, and the people who reply to a poll can differ from those who do not. That is non-response bias, and it made matters worse.

An estimate’s error has two parts. Sampling error is the scatter from one sample to the next; it shrinks like 1/√n, and the margin of error measures it. Bias is the distance between the truth and the value the method is aiming at; it does not depend on n at all. A larger sample cures sampling error, not bias, so a biased poll of millions is confidently wrong: its margin of error closes in on the wrong number. A margin of error is a statement about a random sample, and says nothing about a sample chosen another way.

Gallup’s own method, quota sampling, in which interviewers choose respondents to fill quotas, failed in its turn in 1948, the election of the “Dewey Defeats Truman” headline. Probability sampling, in which chance and not the interviewer decides who is asked, became the standard afterwards. The demo’s electorate is simulated; its parameters are chosen to echo 1936, not to reconstruct it.

The Square-Root Law

Slide your sample size along the line and press Play to check it by simulation. Then shrink the population from 300 million to 10,000, and press New groups to see who tops the league table.

1. Four times the sample for half the error
±3.1
margin of error at n = 1,000, in points
4,000
sample needed to halve it
60 / 2,000
simulated polls at each sample size
20.4%
largest gap between an amber point and the line
A random sample of 1,000 has a margin of error of ±3.1 points. Halving that takes 4,000 people, four times as many. A tenth of the error would take 100,000, a hundred times as many. The first thousand answers buy most of the precision, and every thousand after that buys less.
2. The size of the population hardly matters
Sample size n
±3.10
margin of error with N = 300 million
±3.10
with an endless population
1.0000
correction √((N − n)/(N − 1))
—
simulated: 0 polls without replacement
A sample of 1,000 is 0.0003% of a population of 300 million, and its margin of error is ±3.10 points. In an endless population it would be ±3.10. What matters is how many people you ask, not what fraction of the population they are.
3. The same law for averages: the funnel
120
median size, all groups
17
median size, top 50
19
median size, bottom 50
88%
of the top 50 are among the smallest quarter
80%
of the bottom 50 are among the smallest quarter
Every one of these 1,000 simulated schools is identical in quality: each pupil’s score comes from the same distribution, with mean 100 and standard deviation 15. Yet the league table has winners and losers, and both ends are small schools (35 pupils or fewer make up the smallest quarter). A small school is not better or worse. Its average is just noisier, by σ/√n.

Dashed slate-white: exact theory. Amber: what simulation finds, 1.96 times the standard deviation of the estimates from repeated polls (panel 2 draws its polls without replacement from a population of exactly N). Teal: your chosen sample size, and in panel 3 one dot for each simulated group; sky blue and orange mark the highest and lowest 5% of averages. The proportion p set in panel 1 is used in panel 2 as well. Everything here is simulated.

Go deeper:De Moivre’s Equation and Why Pollsters Stop Near a Thousand

For a proportion p estimated from a random sample of n, the standard error is √(p(1 − p)/n), and the usual 95% margin of error is 1.96 times that. It is largest at p = ½, where it is about 0.98/√n: ±10 points at n = 100, ±3.1 at n = 1,000, ±1.0 at n = 10,000. For a mean the same law reads σ/√n. It appears in Abraham de Moivre’s work on the binomial distribution in the 1730s. Because of the square root, precision is expensive: halving the error takes four times the sample, and one more decimal place takes a hundred times.

The size of the population enters only through the finite population correction. When n people are drawn without replacement from N, the standard error is multiplied by √((N − n)/(N − 1)). For 1,000 people out of 300 million that factor is 0.999998; out of 10,000 it is still 0.95. So a sample of 1,000 serves a country as well as it serves a city, and pollsters commonly stop at 1,000 to 2,000 people: beyond that, each extra interview buys little. The margin of error covers sampling error only. It says nothing about a skewed list, people who do not reply, or a badly worded question, which are often the larger problem.

Howard Wainer called σ/√n “the most dangerous equation”, because of what happens when it is forgotten. Rank schools, counties or hospitals by an average, and the smallest units crowd both ends of the table, since their averages are the noisiest. Seeing small units at the top, it is tempting to conclude that being small is good, while the same units fill the bottom for the same reason. A funnel plot, with the lines μ ± 1.96 σ/√n drawn in, shows how much of a league table is sampling error. It does not show that every difference is noise: a unit well outside the funnel deserves a second look.

Key Takeaways

  • A statistic varies from sample to sample; its sampling distribution, not the population’s, tells you how far to trust it.
  • The sample mean centres on μ with standard error σ/√n, and for large n its distribution is close to normal.
  • Halving the error takes four times the sample, and the size of the population barely matters.
  • A bigger sample shrinks sampling error and leaves bias untouched: a biased poll of millions is confidently wrong.

Spot a mistake or have an idea?

Search