Mental Models204 cards · 12 fields

Mental Models/Mathematics & Statistics

Central Limit Theorem

中心极限定理

Add up lots of small, separate influences, and the result usually looks like a bell curve.

In February 1877, Francis Galton stood a board of pins on the lecture table at the Royal Institution in London. Small lead shot was poured in, one pellet after another, from above the pins and had to fall through row after staggered row of them. Each time a pellet hit a pin it went left or right at random, and in the end it dropped into one of the slots side by side at the bottom. The pellets piled up in the slots layer by layer, high in the middle and low at the sides, and the more were poured in, the clearer the bell shape became.

Roll one die, and each number from one to six comes up one time in six; drawn as a chart, it's a flat line. Add two dice together, and it's no longer flat: there's only one way to roll a total of 2, but six ways to roll 7, so 7 comes up most often. Add up ten dice, and there's only one way each to roll a total of 10 or 60, but more combinations than you could count that land around 35. The shape is already high in the middle and thin at both ends.

That is what the central limit theorem says: add together many small influences that don't depend on each other, and the spread of the total moves toward a bell shape. It doesn't matter whether each single influence is flat, lopsided, or has only two sides, like heads and tails.

More dice, and the total looks more like a bell
0255075100123456Average per dieChance (top = 100)One dieTwo diceTen dice
050100246Average per dieChance (top = 100)One dieTwo diceTen dice

Across: total ÷ number of dice, to compare shapes. One die is flat, two make a peak; ten are thick in the middle, thin at the ends, one way each to total 10 or 60.

An extreme total needs every influence to lean the same way at once

To add up to a very large total, every influence has to happen to come out high. To add up to a middling total, it's enough for some to come out high and some low, canceling each other out, and there are far more combinations like that. So totals mostly land in the middle and seldom at the ends, and that's where the bell shape comes from.

The error of an average shrinks with the square root of the sample size

Suppose each time a scale weighs something, its error has a standard deviation of , say 4 grams. Weigh times and take the average, and the standard deviation of the average is

You have to weigh four times as often just to halve the error. The reason is that errors can be positive or negative. The standard deviation is the square root of the average squared error, so look at the squares first. Say each weighing is either too heavy or too light, and weigh twice. When both go the same way, the errors add to , and the square is ; when they go opposite ways, they cancel to 0. Each case happens half the time, so the average square is , only twice that of one weighing. Weigh times and it's times as much; take the square root and the sum of the errors is , and divide by to leave .

Put in grams: weighing 4 times gives 2 grams, 16 times gives 1 gram, 100 times gives 0.4 grams. To halve it again from 0.4 grams to 0.2 grams, you have to weigh 400 times.

The total gets wider as you add, but more slowly than the count

The error shrinks because taking the average divides by . Look at the total itself, and its width actually grows, only it grows with the square root, as : the total of 100 independent influences is 10 times as wide as a single one, not 100 times.

The bell shape fits best for quantities built up from many small independent influences, such as measurement errors or total exam scores. When a single item can make up most of the total, no bell appears: add up the wealth of a few thousand people, and one very rich person makes up most of it, so the spread stays lopsided. The influences also have to be independent of each other, so that their deviations can cancel out. In 1992, when Hurricane Andrew hit Florida, the same storm pushed tens of thousands of small insurance policies into paying out at the same time, and several insurers went bankrupt as a result.

Predict
Estimate the range a total will land in, such as a week's total customers or the total weight of a shipment: measure the average and the spread of a single one, and you can work out the center and width of the total, then give a range based on the bell shape.
Design
Set a sampling plan for quality checks: first say how much error you can accept, then work backward to how many items to sample from each batch, instead of picking a round number off the top of your head.
Explain
The heights of adults of the same sex, or the measurement errors of one instrument, mostly form a bell shape because a great many small influences are adding up behind them; you don't need to look for a separate cause for each person.
  1. Is this number added up from many small influences, or held up by a few big items? Go through the raw records and see what share of the total the biggest item makes up.
  2. Are these influences independent of each other? Check whether they're being pushed up and down together by the same thing.
  3. How many truly independent data points are in the sample? Repeat entries from the same person or the same household should be merged and counted as one.

Education

A test taken by pure guessing

You're setting a test of 50 multiple-choice questions with four options each, and you want the pass mark where someone who just guesses can't reach it. The chance of guessing each one right is a quarter, so a guesser gets 12.5 right on average, with a standard deviation of about 3, and the scores spread out around the average in a bell. About one guesser in a hundred gets 20 or more right, and about one in ten thousand gets 25 or more. You set the pass mark at 25.

Society

A poll of a thousand people

Before an election you run a phone poll for a newspaper and interview 1,000 people: candidate A has 51%, candidate B 49%. The sample gives a margin of error of about 3 percentage points either way. That number depends only on how many people you sampled, not on how many people live in the country, so it would be the same in a small town. The two are only two points apart, inside the margin of error, so you write the headline "Neck and Neck."

Manufacturing

An alarm line for weighing whole cases

You're a quality inspector at a drinks factory. The filling line puts a nominal 500 milliliters in each bottle; suppose the fill of a single bottle has a standard deviation of about 3 milliliters. A case holds 25 bottles, and the fill of a whole case has a standard deviation of about 15 milliliters, 5 times that of one bottle, not 25 times. You set the alarm line for weighing whole cases at 30 milliliters either way, and whenever a case crosses it, you stop the line and check the filling heads.

Central Limit TheoremNormal vs Fat-Tailed DistributionsExtremes happen far more often than the bell curve says, so everyday averages make risk look small.You need to estimate a coastal city's storm damage claims over the next ten years. Averaging the historical years and drawing error bars from a bell shape is the central limit theorem's way; fat tails see that a few huge storms make up most of the claims, so however narrow the error bars, they shouldn't be trusted. For quantities like these claims, where one item can swallow the total, keep a few extreme scenarios in view first; only small claims of even size are fit to work out with a bell shape.Central Limit TheoremLognormal DistributionWhen results grow and shrink by percentages, a few get huge and pull the average up.The same pile of small random influences takes a different shape when added than when multiplied. A stock's daily rises and falls, added up day by day, come out roughly bell-shaped; but its total return over twenty or thirty years is the daily changes multiplied together, and it trails a long tail to the right. For quantities that are added, use the bell shape directly; for quantities that are multiplied, look at them as a lognormal distribution: take the logarithm first, then apply the bell shape.Central Limit TheoremLaw of Large NumbersWith few tries any lopsided ratio can show up, and only many tries steady it.You've collected a batch of satisfaction surveys. The law of large numbers says the more you collect, the closer the average score gets to the true level, and urges you to keep collecting; the central limit theorem adds how far off you still are: it can give a margin of error, and how many surveys will be enough can be worked out in advance.

A lab measures the moisture content of a sample. The random errors in each reading are independent of each other; suppose their standard deviation is 0.8 percentage points. You now measure 9 times and take the average, and you want to cut that average's error in half.

At least how many measurements will you need in total?

A food delivery rider's delivery time per order is very lopsided: most orders take about 20 minutes, and once in a while one drags out to 80 minutes. Each order is independent of the others. For two years you record the average delivery time of his 250 orders each month, and draw a histogram of those averages.

Roughly what shape is the histogram?

At a parcel station, the weighing error for each parcel is independent of the others, and each has a standard deviation of 2 grams. You put 49 parcels together and weigh them as one total.

About how big is the error (standard deviation) of that total weight?