Math paradoxes

Glossary / Standard error

Glossary · standard error

Twice as precise, four times the cost

You compute the average order value for the week and want to know how far that number can be trusted. It seems that twice as many orders would make it twice as precise. No: it only becomes twice as precise with four times as many orders. How much an average wobbles from one sample to the next is called the standard error.

In plain wordspictures, analogies, small numbers

“In plain words” is hidden on all puzzles.

The average-order paradox

Orders in a shop vary a lot: one person buys for $8, another for $150, and on average it comes to $40. The top chart shows 2,000 single orders. The bottom one shows 2,000 "weeks": each time we take n orders and compute their average order value. Increase n fourfold and watch the width of the lower pile.

Single orders

Average order of the week

Spread of single orders–
Spread of the average order–
Formula σ / √n–

Two different spreads

An explanation without formulas, slightly simplified. The upper pile describes customers, and its width does not change: people don't become more alike because you counted more of them. The lower pile describes your estimate. In an average of many orders, big and small orders partly cancel each other, so the average wobbles less. But the cancelling is slow: the spread falls not n times but √n times. Four times the orders, a pile half as wide.

The typical spread of single values is the standard deviation σ. The typical spread of the average you computed from a sample is the standard error. It shows how far your number usually misses the true average.

The best pages are the smallest

An agency has 200 landing pages, and all are equally good: each one's true conversion rate is exactly 5%. Traffic differs: from 50 to 20,000 visitors a month. Each dot is one page; further right means more traffic (log scale). Who makes it into the "top 10 pages of the month" report?

top 10bottom 105% ± 2 standard errors

Top 10 · from the smallest third–
Bottom 10 · from the smallest third–
Median traffic · top 10 and all–

There is no difference between the pages at all, yet the report still finds "stars" and "laggards", and almost all of them are small. A small page has a large standard error, so its conversion flies far up and down. A big page stays close to the true 5%. The dashed funnel shows where ordinary fluctuations lie for each level of traffic.

Rigoroustables, charts, formulas

“Rigorous” is hidden on all puzzles.

The formula σ / √n

SE = σ / √n   ·   for a conversion rate  SE = √(p(1 − p) / n)

For the average order, σ is the standard deviation of single orders. For conversion, each visitor either bought (1) or not (0), and the σ of such zeros and ones is √(p(1 − p)). At 5% that is √0.0475 ≈ 0.218. The standard error of the conversion rate at 1,000 visitors: 0.218 / √1,000 ≈ 0.69 percentage points.

About 95% of samples give an estimate within ±2 standard errors of the truth (±1.96 to be exact). That is where the "margin of error ±…" in polls and in confidence intervals comes from. Here is what it means for a page with a true conversion rate of 5%:

VisitorsStandard error95% of measurements betweenRelative to 5%

At 1,000 visitors, a page with a 5% conversion rate can easily show anything from 3.6% to 6.4%. One more thing: the error of the difference between two independent estimates is √(SE₁² + SE₂²). For two identical pages that is √2 ≈ 1.41 times larger than for one. So in an A/B test with 1,000 visitors per variant, the ordinary wobble of the difference reaches ±1.9 points, which is a "lift" of up to ±38% between identical pages.

What not to confuse

  • Standard deviation is about people"Orders usually stray from the average by $30." It does not shrink with more data. You need it to plan stock, staff, reserves.
  • Standard error is about your number"Average order $40 ± $0.94." It shrinks like 1/√n. You need it to decide whether to believe a change in a report.
  • Count events, not trafficFor conversion, the error relative to the rate itself is about 1 / √(number of conversions). 50 purchases means ±14%, however many visitors there were.
  • Rankings love the smallThe best and the worst in any ranking by rates are usually the smallest: managers with a few deals, ads with a few clicks, cities with a few customers.
  • Error bars on a chartAlways ask what they are: standard deviation, standard error or a 95% interval. They differ several-fold, and the caption is often missing.
Deepergeneralisations, theory, history

“Deeper” is hidden on all puzzles.

"The most dangerous equation"

In 2007 the statistician Howard Wainer wrote an essay for American Scientist called "The Most Dangerous Equation". That is what he called the formula σ / √n, which he credited to Abraham de Moivre and his book Miscellanea Analytica (1730). It is dangerous because it was ignored for centuries.

  • The Royal MintSince 1150, English coins have been checked at the "Trial of the Pyx": a batch of, say, 100 coins is weighed together. The tolerance for one coin was 1/400 of its weight, and for 100 coins it was simply multiplied by 100. By the √n rule it should have been only tenfold. The extra margin allowed overweight coins to be picked out, recast at the correct weight and the leftover gold kept, all within the rules. According to Wainer, this error persisted for almost 600 years.
  • Kidney cancerThe US counties with the lowest kidney cancer rates are mostly rural and sparsely populated. It is tempting to credit clean country living: fresh air, water, food. But the counties with the highest rates are also rural and sparsely populated. What they share is one thing: a small population and therefore a large error.
  • Small schoolsSmall schools are over-represented among the best schools by test scores. The Bill and Melinda Gates Foundation began backing small schools in the late 1990s, and by 2001 its grants to education projects had reached about $1.7 billion. Wainer showed that small schools are over-represented among the worst too. In 2005 the foundation moved away from the idea.

The pages in the second simulation are the same story in marketing. A "best campaigns of the month" report with no adjustment for size is mostly a ranking of small campaigns' luck.

When √n lies: visits instead of people

The formula σ / √n only works when observations are independent. In web analytics they often aren't: the same people come back several times. Here there are 10,000 visits, and each person makes k visits. One person in ten is "warm" and buys on 41% of visits, the rest on 1%, so the overall conversion rate is still 5%. The computer repeats the month 2,000 times and measures how much the conversion rate really wobbles.

2,000 monthswhat the formula promises for 10,000 independent visits

Error by the formula–
Real error–
Honest sample size–

One person's visits resemble each other, so they bring less new information than separate people. For equal groups the error grows by a factor of √(1 + (k − 1)ρ), where ρ is how alike one person's visits are (here ρ ≈ 0.30). At 10 visits per person, 10,000 visits weigh as much as about 2,600–2,700 independent ones. That is why A/B tests split and count by users, not by sessions.

Where it shows up

Other terms