Roll a die again and again and keep the running average. Twenty people do it at once. Guess where their averages go, then watch.
Averages settle down
Twenty players, each rolling a fair die 10 000 times (seeds 4100 to 4119).
Twenty players each roll a fair die again and again. Each path will be one player's running average.
Predict first. Twenty players each roll a die thousands of times. What do their running averages do?
Describe this picture
Before the clip, three small sketches ask for a guess: the twenty averages “all end exactly on 3.5”, “stay in a narrowing funnel” or “keep wandering the same”; a tap starts the clip. Then twenty paths are drawn left to right, each the running average of its own player’s seeded rolls of a fair die, against the number of rolls on an axis marked 1, 10, 100, 1000 and 10 000, each mark ten times the last. A line marks the mean, 3.5. A dashed funnel labelled “3.5 ± 2σ/√n” shows with : its half-width is 1.080 at , 0.342 at 100, 0.108 at 1000 and 0.034 at 10 000. The paths start far apart and close in, nearly all inside the funnel; after 10 000 rolls the twenty lie between 3.469 and 3.522, all inside. At the end your guess is drawn dotted. Readouts give , how many of the twenty lie inside the funnel, their measured spread and . After the clip a slider, “Rolls, n”, moves a cursor along and the readouts follow; at the spread is 0.1487 against 0.1708, with 19 of 20 inside.
Averages settle down
What did you guess? The paths did not land exactly on 3.5, and they did not keep wandering. Each one closed in on 3.5, fast at first and then more slowly, and nearly all stayed inside the dashed funnel: one of the twenty was outside it at 10, 100 and 1000 rolls, and all twenty were inside at 10 000.
That is the law of large numbers: the average of many independent draws settles on the mean. It is why a casino can count on its share of every bet, and why a poll of a thousand people says something about millions. This page says how fast the average settles, and what the law does not promise.
How fast
One roll of a fair die has mean and variance , so its spread is , as in Variance and standard deviation. The average of rolls is
Its mean is 3.5, because each roll has mean 3.5. For its spread, use the rule from Sums of random variables: for independent draws, variances add. The sum of rolls has variance . Dividing the sum by divides the variance by . So
That square root is the shape of the funnel. Ten times as many rolls shrink the spread by , about 3.16. To halve it you need four times as many rolls. The dashed funnel in the picture is two spreads either side of 3.5: about 19 of the 20 paths should lie inside it at any . Drag the cursor after the clip and compare the count.
Markov and Chebyshev inequalities
“About 19 of 20 within two spreads” uses the bell shape of the averages, which the page The central limit theorem explains. Can I promise anything without it? Yes, with two short inequalities.
Markov’s inequality. If is never negative, then for any
The reason: the draws that are at least alone contribute at least to the mean, and the others contribute nothing negative. For a die, . The true value is . The bound is safe but loose.
Chebyshev’s inequality. Apply Markov’s inequality to the squared distance from the mean, , whose mean is . For any ,
It holds for every shape. For a die, a distance of at least 2.5 from 3.5 is spreads, and the bound is . The truth is , the rolls 1 and 6.
The weak law. Now apply Chebyshev’s inequality to the average , whose variance is . Write for a small distance you will accept, such as 0.1. Then
and the right-hand side falls to 0 as grows. However small you make , the chance that the average misses by more than can be made as small as you like by rolling enough. That is the weak law of large numbers.
What the law does not promise
A fair coin has landed heads five times in a row. Is tails now due? Many people feel it must be: the coin has to catch up. It does not. The coin has no memory, as the page Independence showed, and the next flip is still even odds.
Then how does the average settle? Not by paying back the streak, but by burying it. After five heads, the next thousand flips are about half heads, and five extra heads in a thousand barely move the share.
The counts themselves do not even out. After flips, the share of heads has a spread of , so it is within of one half about 95 % of the time. But the gap between heads and tails, the count of heads minus the count of tails, is typically about , and it keeps growing as . The share settles; the gap does not.
The law also says nothing about the next draw. It is about averages of many draws, never about one.
Worked example
How many rolls? You want the average of your die rolls to be within of , with a chance of about 95 %.
- With the bell. Two spreads should be 0.1: , so and . Round up: 1167 rolls.
- With Chebyshev’s guarantee. Ask for a miss chance of at most 0.05: , so . Round up: 5834 rolls. That is safe for any shape, but five times more than the bell needs.
- The spread of 100 rolls. .
- Halving the funnel. Four times as many rolls.
- After five heads. The next flip is still heads with chance .
Where you’ll meet this
A pollster who asks 1000 people a yes-or-no question is averaging 1000 draws of 0 or 1. The spread of the share is at most , and that sets the margin quoted with the poll.
A computer that estimates an area, a price or a probability by simulating random cases is relying on this law; to get one more correct digit, it needs a hundred times as many cases, because of the square root. An instrument that averages many noisy readings of the same quantity gains the same way. And a casino wins over many bets because its small edge is the mean, and the average of thousands of bets settles on it.
In signal processing · averaging noisy estimates
The page Averaged periodograms: Bartlett and Welch estimates a spectrum by averaging the spectra of many short pieces of a signal. Averaging independent pieces divides the variance of the estimate by , the of this page.
Where this leads · the mean as a projection
Of all lists , the one closest to numbers is : the average times the all-ones list. That is a projection in the sense of Projections in the linear algebra course.
The funnel says how wide the pile of averages is. The page The central limit theorem shows what shape it has.
Reference card
| Quantity | Formula | Notes |
|---|---|---|
| Average | independent draws, one shape | |
| Its variance | spread | |
| Markov | , | |
| Chebyshev | any shape | |
| Weak law | falls to 0 as grows | |
| Sizing | about 95 %, with the bell | |
| Counts | heads minus tails grows like | the share settles, the gap does not |