Find a course

Module 2: Getting the Data RightLesson 3 of 1212 min

Samples, Bias and Margin of Error

See how a huge poll got an election badly wrong, recognize common forms of sampling bias, and explore how sample size shrinks the margin of error.

Step 1 of 10Learn

The poll with 2 million answers that got it wrong

In 1936, a popular American magazine, the Literary Digest, ran one of the largest polls in history. It mailed questionnaires to about 10 million people and received over 2 million replies. Its prediction: the Republican challenger, Alf Landon, would beat President Franklin Roosevelt comfortably.

Roosevelt won in a landslide, carrying 46 of 48 states.

Meanwhile, a young pollster named George Gallup, using a far smaller but more carefully chosen sample, correctly predicted Roosevelt's win.

What went wrong? The magazine drew its mailing list largely from telephone directories, car registrations and its own subscribers. During the Great Depression, people who owned phones and cars were wealthier than average and leaned Republican. On top of that, only about a quarter of those contacted replied, and people with strong opinions against the president were more motivated to respond.

The lesson has shaped statistics ever since: a big sample doesn't fix a biased one. Two million answers from the wrong people are worse than a thousand from the right ones.

In analysis terms, the population is the whole group you want to understand (all voters, all customers, every product made this year). The sample is the part you actually measure. Conclusions about the population are only as good as the sample's ability to represent it. The gold standard is a random sample, where every member of the population has a known, usually equal, chance of being selected.

Step 2 of 10Chart

1936: a huge poll vs. the actual vote

1936: a huge poll vs. the actual voteBar chart with 2 categories: Literary Digest poll: Roosevelt 43%, Landon 57%; Election result: Roosevelt 61%, Landon 37%.0%20%40%60%80%100%Literary Digest pollElection result43%57%61%37%
Rounded shares of the two-candidate vote. Over 2 million replies could not fix a biased mailing list.
1936: a huge poll vs. the actual vote
ItemRooseveltLandon
Literary Digest poll43%57%
Election result61%37%

Step 3 of 10Learn

How samples go wrong

Sampling bias happens when some members of the population are systematically more likely to end up in your data than others. Common forms:

  • Selection bias: the way the sample is chosen excludes or overrepresents certain groups. Surveying only customers who visit your website misses those who buy in stores.
  • Voluntary response bias: people choose whether to participate, and those with strong feelings respond more. Online reviews skew toward the delighted and the furious.
  • Nonresponse bias: many people selected don't respond, and they differ from those who do. Busy people often skip long surveys.
  • Survivorship bias: you only see the cases that made it through some filter. During World War II, analysts studied bullet holes on bombers returning from missions and considered adding armor where holes clustered. Statistician Abraham Wald pointed out that these were the planes that survived. Armor was needed where returning planes had no holes, because planes hit there didn't come back.
  • Convenience sampling: measuring whoever is easiest to reach, such as surveying your own coworkers about a product meant for teenagers.

Survivorship bias is everywhere in business. Studying only successful startups to find the "secrets of success" ignores the many failed companies that did the same things. Looking at the performance of investment funds that exist today ignores the poor performers that were closed.

Before analyzing any dataset, ask: who or what is missing, and could they be different?

Step 4 of 10Practice · Match the pairs

Match each situation to the bias it shows.

Tap an answer, then tap the place where it belongs (or drag it there).

  1. A gym surveys members about exercise habits and concludes most adults work out often
  2. A news site asks readers to vote in an online poll about a controversial law
  3. A study of long-running restaurants finds they all use family recipes and credits the recipes for success
  4. Only 15% of customers return a long satisfaction survey, mostly those with lots of free time

Step 5 of 10Learn

Sample size and the margin of error

Even a perfectly random sample won't match the population exactly, because of chance. Poll 1,000 random voters and you might find 52% support for a measure when the true figure is 50%. The margin of error describes how far off a sample estimate is likely to be due to chance alone.

For a percentage from a simple random sample, an approximate 95% margin of error is:

Margin of error ≈ 1.96 × √( p × (1 − p) ÷ n )

where p is the sample proportion (as a decimal) and n is the sample size. With p = 0.5 and n = 1,000, that's 1.96 × √(0.25 ÷ 1,000) ≈ 0.031, or about ±3 percentage points. So a poll showing 52% means the true value is likely between about 49% and 55%.

Two features of this formula surprise people:

  • Precision improves with the square root of n. Quadrupling the sample only halves the margin of error. Going from 1,000 to 4,000 respondents cuts ±3.1 points to about ±1.5.
  • Population size barely matters as long as the population is much larger than the sample. A random sample of 1,000 gives about the same precision for a city of 500,000 as for a country of 300 million.

Remember that the margin of error covers only random chance. It says nothing about bias. A biased poll of 2 million people can have a tiny margin of error and still be badly wrong, as the 1936 poll showed. Explore the formula below.

Step 6 of 10Practice · Chart

95% margin of error at p = 0.5

Tap the sample size that cuts the n = 100 margin roughly in half.

Tap the bar that answers the question, then press Check.

95% margin of error at p = 0.5Bar chart with 5 categories: n = 100: 9.8 pts; n = 400: 4.9 pts; n = 1,000: 3.1 pts; n = 2,500: 2 pts; n = 10,000: 1 pts.0 pts2 pts4 pts6 pts8 pts10 ptsn = 100n = 400n = 1,000n = 2,500n = 10,0009.8 pts4.9 pts3.1 pts2 pts1 pts
Calculated with 1.96 × √(0.25 ÷ n). Quadrupling the sample halves the margin.
95% margin of error at p = 0.5
ItemMargin of error
n = 1009.8 pts
n = 4004.9 pts
n = 1,0003.1 pts
n = 2,5002 pts
n = 10,0001 pts

Step 7 of 10Explore

Margin of error explorer

The curve shows the approximate 95% margin of error (in percentage points) for a sample percentage, as sample size grows. Change the proportion to see when uncertainty is largest.

051015 1,0002,0003,000
Margin of error at n = 100
9.8 points
Margin of error at n = 400
4.9 points
Margin of error at n = 1,600
2.5 points

Step 8 of 10Practice · Work it out

Use the explorer or the formula. With a sample proportion of 0.5, what is the approximate margin of error at n = 400, in percentage points? (Round to one decimal.)

Step 9 of 10Practice · What would you do?

What would you do?

A company wants to know what share of its 200,000 customers would use a new delivery option. Which plan gives the most trustworthy estimate?

Step 10 of 10Practice · Choose one

A survey of 10,000 people has a margin of error of about ±1 point, but it was conducted only among people who signed up on a website. What is the main concern?