Everybody "knows" that a running average of coin flips settles onto 0.5. That one sentence quietly fuses two claims of very different sizes. That the average is centered at μ is free — one line of linearity. That the average lands close to μ, with high probability, is a theorem, and proving it is the summit we climb here. Chapter 16 finished packing the luggage for that climb. For almost any random variable you can now produce a mean μ, the balance point of its mass, and a variance σ², the expected squared distance from that point, and you know when the variances of a sum add cleanly. So this chapter asks the blunt question those two numbers have been waiting for. What can a mean and a variance guarantee about where the probability mass actually sits? The answer is one crude, reusable move, fired three times. Markov's inequality says mass parked far from zero must be paid for out of the mean. Fire that bound at the squared deviation and out comes Chebyshev. Fire Chebyshev at the sample mean, whose variance collapses like σ²/n — at n = 100 that is σ²/100, a spread one tenth of σ — and out falls the Law of Large Numbers, for any distribution with finite variance, no bell curve assumed anywhere.
01Two numbers, and everything they must cover
The whole kit is two numbers per variable, plus a handful of rules for moving them around. Let's take stock of it, because this chapter runs on nothing else. From Chapter 15 you own the mean μ, the balance point where a distribution's mass sits level, and the variance σ² = E[(X−μ)²], the expected squared deviation from that point. Fill it in for a fair coin, heads 1 and tails 0: μ = 0.5, and the squared deviation is (0.5)² = 0.25 either way, so σ² = 0.25. From Chapter 16 you own the algebra for combining the two numbers. One rule matters most here. For independent variables, variances add, because the cross-terms die.
Anything we prove from (μ, σ²) alone must hold for every one of the distributions wearing that pair, and there are infinitely many of them. That is the honest question of this chapter, and it is sharper than it looks. A mean and a variance are a brutal compression. The two numbers cannot tell those shapes apart, so a proof fed only μ and σ² is a proof about all of them at once. Morph the shape below and watch the two readouts refuse to move. Whatever guarantee we extract in this chapter, all of these worlds inherit it.
Two numbers, many worlds — same μ, same σ², five unrecognisable shapes
Two numbers see the shape? NO
μ=50, σ²=625 never move — only the shape does.
What you're looking at — five shapes forced to wear the same two numbers
blue bars = the whole distribution — it redraws completely with every click
gold dashes + bracket = μ=50 and σ=25 (so σ²=625) — pinned, they never move
Any guarantee built from only μ and σ² must hold for all five shapes at once — and every shape you didn't draw. That's why this chapter's bounds (Markov, Chebyshev) come out crude: crude is the price of a promise this blind to shape.
Fig. 1. Five distributions, one frozen pair of numbers: μ=50 and σ²=625 (σ=25) exactly, on every stop. Slab — 7 equally spaced outcomes (12.5 to 87.5, step 12.5), each exactly 1/7. Bimodal — two spikes at 25 and 75, 50% each. Spike+tail — 80% sits at 37.5, a thin 20% sits way out at 100. Staircase — four rising steps at 0/25/50/75 worth 10/20/30/40%. Ramp — five bars climbing 10/15/20/25/30% across an uneven, right-leaning spread. Every one was built the same way: take any raw shape, then slide and stretch it until its own mean and variance land exactly on 50 and 625 — proof that (μ,σ²) is a compression so lossy it can't rule out a single one of these. Whatever Markov and Chebyshev promise from μ and σ² alone, they promise for all five at once — which is exactly why those promises come out crude.
So here is the trade, stated plainly before we make it. We will assume no bell curve, no die, no formula for the distribution at all. We feed on μ and σ² and nothing else. The payoff is that every result here is distribution-agnostic, working on shapes nobody has ever written down. The price is that our bounds will be crude. A crude guarantee that covers every shape is exactly the trade the summit needs, and you are about to see how far two numbers can be pushed.
02Watch it settle — then say what you saw
Start with the phenomenon everybody already believes. Flip a fair coin again and again, and after every flip write down the running average of heads so far — the quantity X̄ₙ = (X₁ + ⋯ + Xₙ)/n, heads counted as 1 and tails as 0. Three flips of heads, tails, heads give (1 + 0 + 1)/3 ≈ 0.67, and that is all the formula ever means. Run it live below. The early average lurches all over the place. Then, as n grows, it calms down and settles onto 0.5, wandering less and less as the count climbs. Re-seed the run and it happens again, along a completely different wobbly road.
The settling average — an executed coin-flip run, live
press play to flip the first coin
What you’re looking at — a real coin flipped in your browser, not a drawn-on curve
the running average X̄ₙ after each real flip — wild early, then it narrows
the target p = 0.5 — where X̄ₙ is heading, never forced
ghosts of earlier runs — same target, a different road every time
Fig. 2. Each press of ▶ play flips a fair coin — executed live in your browser, not scripted — and plots the running average X̄ₙ = (1/n)Σxᵢ after every flip. At n=1 one flip swings it to 0 or 1; as n grows the swing shrinks, because Var(X̄ₙ) = σ²/n with σ²=p(1−p)=0.25, so SD(X̄ₙ) = 0.5/√n — about 0.07 at n=50, 0.035 at n=200. Press re-seed and a new path draws live over the ghosts of the old ones: it always homes in near 0.5, never by the same road twice. That repeatable homing is real — but a figure only ever shows it happening; it can't show that it's guaranteed. Proving that is next.
Now the trap, because your gut is about to explain that settling with a lie. The lie is the gambler's fallacy: the feeling that after a streak of heads the coin somehow owes tails, and pays that debt off by dragging the average back down. It doesn't. The coin has no memory. Each flip is independent of everything before it, exactly as Chapter 5 defined the word. So let's force the worst case and watch what actually restores the average.
an "inject 10 heads" CodeRun — force the worst streak, then run fair and watch what actually recovers
predict: after the streak, will extra tails show up to catch up?
predict, then inject the streak
What you're looking at — the streak is never paid back, it's just outnumbered
heads-after vs tails-after stay level — no compensating surge of tails ever arrives
10/n is the streak's shrinking weight in the average — that shrinking, not any catch-up, is why the average still settles near 0.5
Fig. 3. Force ten straight heads, then run fair: the counters after the streak stay level, and the average recovers only because the streak's share, 10/n, shrinks.
Dilution settled the fraction, but it never said the coin balances its books. The fallacy feeds on one last question. As the fraction locks onto 0.5, does the gap between heads and tails — the raw count of heads minus tails — shrink too? Predict honestly first. Most people feel that gap must close as well.
Same run, opposite motion — the fraction settles while the count gap flees
Predict: as H/n locks onto 0.5, does the head−tail gap D…
Press ▶ Play to begin.
What you're looking at — one run, two opposite motions
blue = the fraction H/n, calming onto 0.5 — the proportion converges
red = the count gap D = 2H−n, wandering outward — the counts diverge
green = the ±√n band — the gap's typical scale (the walk strays around it) — and √n grows forever
Aha: settling is not correcting. The gap of size ~√n is never repaid — H/n converges only because that √n gap is out-voted by an ever-bigger n. Since (√n)/n = 1/√n → 0, the ratio vanishes while the raw gap keeps climbing. Dilution, not repayment.
Fig. 4. One simulated fair-coin run (flips generated in your browser) drives both panels, which share the n-axis. Guess first, then press Play: the blue fraction H/n calms onto 0.5 (reads H/n = 0.500 by n=10000), while the red count gap D = H−T = 2H−n wanders, its typical size growing like ±√n (√10000 = 100, often into the hundreds) — never settling at 0. Toggle the band or re-seed: no run's gap returns to and stays at 0. The proportion converges precisely because a √n-sized gap is out-voted by an n-sized crowd — (√n)/n = 1/√n → 0. Dilution, not repayment: the lead is never paid back, only diluted. The coin-count twin of Fig. 13.
The average recovers, and not one tail is owed for it. Inject a streak of ten straight heads and the average jumps, as it must. Then let the coin run fair and count what follows. The later flips split roughly evenly, no surge of tails ever arrives, and yet the average slides back toward 0.5 anyway. Here is what is actually doing the work. The streak is a fixed offset of ten extra heads, and n keeps growing underneath it, so the streak's share of the average is 10/n — worth 0.1 at n = 100, and only 0.01 at n = 1000. The coin never balances its books. Dilution does.
So the settling is real, and it is not magic. But before we can prove anything, we have to split one sentence in half. "The average approaches the mean" quietly fuses two claims of very different sizes. Claim one: X̄ₙ is centered at μ, meaning E[X̄ₙ] = μ. That claim is free. Linearity of expectation hands it over in one line, at every n, with no work and no independence needed. Claim two: X̄ₙ actually lands close to μ, with high probability. That claim is the theorem. And to feel that centered genuinely does not imply close, here is a world built to break the fusion.
Drop draws — centered at μ=50 is not the same as close to 50
tap drop to sample this world
tap drop to sample
What you're looking at — a world centered exactly on its own mean
the world itself — where X can actually land
the ±10 window around μ — the only zone that counts as “close”
a draw landing inside the window — it counts
a draw landing outside — it never will, in this world
Aha: E[X]=50 is exact in both worlds — a mean is just a first moment, not a promise of nearness. Whether draws ever get close is a different question, P(|X−μ|≥a), and that tail probability, not the mean, is what the rest of this chapter learns to bound.
Fig. 5. Two point masses, P(X=0)=P(X=100)=0.5, give E[X]=0·0.5+100·0.5=50 exactly — yet |0−50|=|100−50|=50, so nothing ever lands in the ±10 window (40,60): P(|X−50|<10)=0, forever, by construction. Hit drop and the scoreboard proves it — draws climb, inside stays 0. Switch to tight and X becomes Uniform(42,58): same mean 50, but every value sits within 8 of it, so inside now matches draws one for one. E[X]=50 held in both worlds — what changed is P(|X−μ|≥a), the tail probability this chapter is actually about.
Here is a distribution centered at 50 that never once produces a value anywhere near 50. The two-spike world puts half its mass at 0 and half at 100, so its mean is exactly 50. Sample it all day and count the draws landing within ±10 of that center. The counter reads zero, forever, because no outcome even exists between 0 and 100. So centering guarantees nothing about closeness, and the quantity we actually need to control finally has a name. It is a tail probability, written P(|X − μ| ≥ a) — the chance of being caught at least a away from center. Everything that follows in this chapter is machinery for bounding tail probabilities from summaries alone.
03Markov: far mass must be paid for
Here is the one genuinely new idea of the chapter, and I want you to find its ceiling with your own hands before I write it down. Take a random variable that is never negative — hours waited, money won, counts of anything. Pin its mean at E[X] = 1. Now play the saboteur. Drag as much probability mass as you can out to 10 or beyond, while holding that mean at 1. Predict first, honestly. Can you park half the mass out there? A third?
The counterweight rail — pin the mean at 1, then try to park probability out at 10.
Predict: the mean is pinned at 1. How much probability can you park at or beyond 10?
mean 0.50 — room for more
Why the far tail can never beat 1/10 — it is spending a fixed mean budget
the blue lump sits at 10 — its weight is P(X≥10)
the counterweight (1−w), jammed at the wall (value 0)
the mean is a fixed budget of exactly 1
ceiling E[X]/a = 1/10: a lump w at 10 alone spends 10w, so w ≤ 1/10 — that snap-back is Markov
Fig. 6. The mean is pinned at 1; the wall at 0 means no mass can sit at a negative value. Push probability out to 10 and the see-saw tips: a lump of weight w sitting at 10 drags the mean to 10w all by itself. To haul the mean back to 1 you'd need a counterweight left of 0 — forbidden. So the far mass hits a hard ceiling the instant 10w = 1, i.e. w = 0.10. That snap-back is Markov: for X ≥ 0, P(X ≥ a) ≤ E[X]/a — far mass must be paid for out of the fixed mean.
You bounced off a ceiling at exactly one tenth, and the rail just showed you why. Every lump of weight w you drag out to 10 contributes 10·w to the mean all by itself, because the mean is the mass-weighted balance point from Chapter 15. To hold that balance at 1 you must counterweight, and the farthest left any mass can go is 0, because non-negativity is a wall. So even with everything else piled at zero, the tail's own contribution already spends 10·w out of a budget of 1. That forces w ≤ 1/10. Park a fifth of the mass at 10 and the mean would be 0.2 × 10 = 2, twice the budget. Mass parked far out must be paid for out of the mean. And the mean is all there is to spend.
That is Markov's inequality, and the formula is just the receipt for what you felt. For non-negative X and any threshold a > 0, P(X ≥ a) ≤ E[X]/a. Fill in the sandbox you just played in — mean 1, threshold 10 — and it reads P(X ≥ 10) ≤ 1/10, the one tenth you kept bouncing off. The proof you performed is the honest one-liner. The mass at or beyond a contributes at least a·P(X ≥ a) to the mean, everything else contributes at least zero, so a·P(X ≥ a) ≤ E[X]. Divide by a. Done. Sweep the threshold across a real distribution and watch the spend-meter track the budget.
Sweep the threshold a — watch the bill chase, but never catch, the fixed E[X] budget
$1.35 ≤ $3.06 — Markov holds ✓
What you're looking at — the tail's cheapest guaranteed value, made physical.
blue: spend levels below a — not in the tail, not in the bill
gold: the tail X≥a, and the spend bar it fills — a·P(X≥a)
green: the fixed E[X] budget line — the bill never crosses it
Rearrange a·P(X≥a) ≤ E[X] and you get Markov's bound P(X≥a) ≤ E[X]/a — the whole proof was just this bar staying under this line.
Fig. 7. Drag a: the bill a·P(X≥a) rises then drops in a sawtooth as bars leave the tail, but it never climbs past the fixed E[X] line — swap crowds and the shape changes completely, the ceiling doesn't move.
One number — the mean — disciplines every possible tail at once, and the meter shows exactly how. At every threshold, a·P(X ≥ a) is the tail's minimum bill, and it never once climbs above the E[X] budget line. At small a the bill is cheap, so a huge tail is affordable and the bound is lazy. At large a each unit of mass costs dearly, so the tail must be thin. And notice what we never asked for: the shape. No bell, no formula, no histogram.
One more question, because a good engineer always asks it of a bound: is E[X]/a sloppy? Could a cleverer argument, fed the mean alone, beat that bound? No, and you can build the distribution that proves it.
Build the equality case — tune the two-point world until Markov's ceiling is met exactly
under — push p toward 1/a
What you're looking at — the only world that spends the mean budget exactly
p, the mass sitting exactly at a — this is the tail P(X≥a)
the target E[X]=1 and the ceiling E[X]/a it forces
tail = ceiling — equality, achieved by hand
mass moved off the two points, to a middle value
Only mass at exactly {0, a} can meet the ceiling; move any of it inward and the mean stays fixed but the tail must fall — the bound goes strictly loose.
Fig. 8. Two points only: mass p at a, mass (1−p) at 0. The mean is exactly a·p — tune p until it lands on the target E[X]=1, and the tail P(X≥a)=p lands exactly on the ceiling E[X]/a: equality, built by hand. Switch to spread and drag mass off the two points into the middle (value a/2): the mean stays pinned at 1 by construction, yet the tail falls strictly below the ceiling — a gap opens between the fill and the dashed line. That is the whole answer to "could a cleverer argument beat Markov from the mean alone?" — no: the all-or-nothing world at {0,a} is the unique case that spends the mean budget exactly on the tail, so it already sits on the ceiling. Beating it needs a second number, not a smarter proof — the variance, next.
Put mass at exactly two points, 0 and a, nothing anywhere else, and tune the split until the mean lands on E[X]. The tail then holds exactly E[X]/a — the ceiling, met with equality. With mean 1 and a = 10, that is a tenth of the mass sitting at 10, since 0.1 × 10 = 1. Markov is tight: a real distribution reaches the ceiling, so no argument fed only the mean can beat it. Improving the bound means buying more information about the shape. That purchase is exactly where we are headed next, and the currency will be the variance.
04The squaring rung
Markov cannot touch what we want next, and the reason is a minus sign. What we want to bound is two-sided: P(|X − μ| ≥ a), straying far from the mean in either direction. The deviation X − μ is negative for every outcome left of the mean, which is roughly half the world. Markov's whole proof leaned on the counterweight wall at 0. Feed Markov a variable that can go negative and the argument simply is not licensed to run.
The fix is one move: square the deviation. Most books make that move silently, which is exactly why it looks like a rabbit pulled from a hat. But don't accept it on my say-so. A move like this owes you two things, and you should check both. First, squaring must not change the event we care about. Second, it must actually fix the negativity problem. Slide the threshold below and watch the first check pass.
Same event, new clothes — {|X−μ|≥a} and {(X−μ)²≥a²} pick out the same outcomes
a = 4 · test X = 3
IDENTICAL — 14/21 both ways
What you're looking at — one event wearing two outfits
an outcome X, outside the tail — same colour in both panels
an outcome inside the shaded event — identical set in A and B
the threshold: a in panel A, a² in panel B
the one test outcome you drag — flips colour at the same instant in both
Aha: squaring never re-orders non-negative numbers, so |X−μ|≥a and (X−μ)²≥a² can only ever agree — it's the same outcomes, renamed.
Fig. 9. Fix μ=0 and let X range over 21 outcomes, −10 through 10. Panel A shades {|X−μ|≥a}; panel B shades {(X−μ)²≥a²} for the same outcomes. Drag the test outcome and its colour flips in both panels on the exact same step — never one before the other — because squaring is monotone on the non-negative distance |X−μ|: it can relabel a value, but it cannot swap two outcomes' order. At a=4, the checker counts 14 of 21 outcomes on each side, always the same 14, reading IDENTICAL. This is the rung Chebyshev stands on: apply Markov's bound P(Y≥b)≤E[Y]/b to the non-negative Y=(X−μ)² with b=k²σ², and P(|X−μ|≥kσ) becomes P((X−μ)²≥k²σ²)≤σ²/(k²σ²)=1/k² — nothing about the event changed, only its clothes.
On the outcome line, shade every outcome with |X − μ| ≥ a. Now shade every outcome with (X − μ)² ≥ a². The two shadings coincide exactly, at every a you try. Take a = 3: being at least 3 from the mean and having a squared deviation of at least 9 pick out the same set of outcomes, because squaring keeps order on non-negative quantities. Same event, in new clothes. And the same event has the same probability, so nothing about the chance we care about has moved. That is why the squaring is not a manipulation. It renames the event and does not replace it.
Now the second check, and it is the one that makes the whole trick legal.
The license lamp — why Markov may now fire
d=−2.5 <0 → no wall, refused
Squaring's first job: it manufactures the non-negativity Markov needs
X−μ dips negative below the mean — no wall, so Markov can't start
(X−μ)² is never negative, by construction — the lamp flips legal
pale curve = X's distribution — drag its shape; the fold logic never changes
Fig. 10. Toggle to (X−μ)² and the red half of the rail — every outcome below the mean — collapses into the zero point while the rail turns green: a square can never land negative, so the lamp flips from dark to legal. Drag deviation to park a sample anywhere, and drag shape to reshape X's distribution — the fold and the lamp never care which shape you chose, because the whole argument only ever used the sign of X−μ. That's squaring's first job: the license. Its second job, still owed, is next — E[(X−μ)²] already has a name.
The raw deviation X − μ dips below zero, so the Markov lamp stays dark. No wall, no counterweight argument, no bound. Square that deviation, and (X − μ)² is non-negative by construction — a square cannot be negative — and the lamp flips on. Hold on to the double duty here, because squaring is doing two jobs at once. Job one, just witnessed: squaring makes the variable non-negative, which is the only reason Markov may touch it. Job two is waiting in the next section. The squared deviation's expected value happens to be a number you have owned since Chapter 15.
05Chebyshev: the same move, fired again
Now there is nothing left to invent. We hold Markov, a crude bound that eats any non-negative variable, and we hold a freshly squared deviation that qualifies as one. Aim Markov at the squared deviation and turn the crank slowly. Every step below is a substitution, and not one of them is new.
Chebyshev, derived live — it is Markov, fired again at the squared deviation
can't fire — square it first
1234
Goal: bound P(|X−μ| ≥ a) — a two-sided event.
But Markov only fires on something ≥ 0, and X−μ can be negative. Stuck.
What you're looking at — Chebyshev assembled from Markov in four moves
the event we bound — X strays ≥ a from μ, and its square
the payoff term E[(X−μ)2] — which IS σ2
the lamp: once Y=(X−μ)2 ≥ 0, Markov may fire
before the fold — X−μ can be negative, so Markov can't
Aha: Chebyshev is not a second theorem to memorise — it is Markov aimed at (X−μ)2. And because E[(X−μ)2] is the definition of variance from Chapter 15, σ2 arrives in the numerator for free: P(|X−μ| ≥ a) ≤ σ2/a2.
Fig. 11. Chebyshev is Markov, fired a second time. We can't point Markov at X−μ (it can be negative), so we square: with Y=(X−μ)2 the two-sided event |X−μ|≥a becomes the one-sided Y≥a2, and Y≥0 — the lamp goes green, Markov may fire. It gives P((X−μ)2≥a2) ≤ E[(X−μ)2]/a2. The last move is pure bookkeeping: E[(X−μ)2] is the definition of variance σ2 (Ch 15), so it slides straight into the numerator, leaving P(|X−μ| ≥ a) ≤ σ2/a2. Set a=kσ and it reads P(|X−μ| ≥ kσ) ≤ 1/k2 — loose on purpose, because it holds for every distribution.
Fire Markov at the variable Y = (X − μ)² with threshold a²: P((X − μ)² ≥ a²) ≤ E[(X − μ)²]/a². The left side is, by the shading argument, exactly P(|X − μ| ≥ a). Now look hard at the numerator on the right. E[(X − μ)²] is not a new quantity to compute. It is the definition of variance, verbatim, from Chapter 15, arriving on cue. Relabel it in place and the line reads P(|X − μ| ≥ a) ≤ σ²/a². Set a = 2σ and the ceiling is σ²/(2σ)² = 1/4: at most 25% of any distribution's mass can sit two standard deviations or more from its own mean. That is Chebyshev's inequality, and I want you to file it correctly. It is not a second theorem to memorize next to Markov. It is Markov fired a second time, at a cleverly chosen variable, with σ² walking into the numerator for free.
Name the move, because you now own it as a template: aim a crude bound at a well-chosen non-negative variable. Markov was the first firing. Chebyshev is the second. The Law of Large Numbers, one section from now, will be the third. Same trigger, better ammunition each time.
And because Chebyshev came from Markov, Chebyshev inherits Markov's superpower: neither bound ever asked what the distribution looks like. Step through some deliberately ugly shapes below and watch one certificate cover them all.
One certificate, every shape — the 2σ ceiling, walked across three shapes
tap a case to switch →
true 0.0% · ceiling 25% — safe
What you're looking at: one certificate, stamped on three unrelated shapes
blue = the shape of X — flat, two-humped, or long-tailed, all built to the same σ²
green = that shape's TRUE tail mass beyond 2σ, computed exactly for each case
gold = Chebyshev's ceiling, ¼ — never recomputed, never moved, always on top
Fig. 12. Three distributions, one shared variance (σ²=1): a flat uniform whose support never even reaches 2σ (true tail = 0.0%), a two-humped bimodal that barely leaks past the line (≈0.6%), and a long-tailed exponential whose real 2σ tail is still only ≈5.0%. Chebyshev's ceiling — P(|X−μ|≥2σ) ≤ ¼ — sits fixed at 25% every single beat, because its derivation (Markov applied to (X−μ)²) only ever consumed σ²; it never looked at the shape. Step to All and every case lines up under that one unmoved line: loose, sometimes very loose, but never wrong.
A flat uniform, a two-horned bimodal, a long-tailed exponential — wildly different shapes, tuned to share one σ². Chebyshev issues the identical certificate to each: at most σ²/a² of mass beyond distance a, which at two standard deviations means never more than 1/4. That ceiling is 25%. The true tails run far thinner: a normal distribution puts about 5% of its mass past 2σ, a fifth of what Chebyshev allows, and the exponential's real 2σ tail is a fraction of the ceiling too. So the bound is often generously lazy. Chebyshev does not care, and that is the point of it. The certificate was priced from two numbers, so it holds for every shape wearing them, including shapes nobody has ever drawn.
Figure 12 fixed the dial at two sigma and gave every shape the same ceiling: 1/k² at k = 2, or 1/4. But an expert sets that dial themselves. Turn k by hand and read both faces: the mass that can escape past kσ, and the mass trapped within. At k = 3 the ceiling drops to 1/9. Then find the one setting where the bound promises nothing.
Turn the k-dial — at most 1/k² strays past kσ, so at least 1−1/k² stays within
predict (at k=2): the MOST mass that can sit beyond 2σ — for ANY shape?
— pick one, then drive the dial —
tail ceiling 1/k²25%
within floor 1−1/k²75%
at least 75% of ALL mass within 2.0σ
What you're looking at — one knob, two readings, and a floor no shape falls through
gold window = ±kσ around μ; the bar splits at the gold floor into green = 1−1/k² guaranteed within and red = 1/k² the most that can stray
blue dot = a bell's real inside-fraction, green dot = a uniform slab's — both stay right of the floor at every k, because the floor is a promise, not a prediction
Fig. 13. Drag the k-dial and read the same guarantee three ways. The bar splits at the gold floor: green is the at-least mass within ±kσ (1−1/k²), red is the at-most that can stray (1/k²) — one knob, two readings. At k=2 the ceiling is 25% out, so 75% within; at k=3, 11.1% out and 88.9% within; at k=5, 4% out and 96% within — true for every distribution. Drag below 1 and the guarantee empties: at k=1 the floor is 0% and the readout flashes promises nothing. The blue and green dots are a real bell (95.4% within 2σ) and a uniform slab (100%) — both sit safely above the floor at every k, because the bound is a floor for the guarantee, not a prediction of the truth.
06The average's two summaries
Time to point the cannon at the thing we actually care about. Take n independent trials X₁, …, Xₙ, each with the same mean μ and variance σ², and form the sample meanX̄ₙ = (X₁ + ⋯ + Xₙ)/n. Firing Chebyshev at the sample mean needs exactly two facts about it: its mean and its variance. The mean is the free half. Linearity gives E[X̄ₙ] = (1/n)(μ + ⋯ + μ) = μ, at every n, with independence not even required. Average a hundred fair coin flips and the expected running average is 0.5, exactly as it is after a single flip. Centered, always. That was never the hard claim.
The variance is the whole story, and I want it in two separate strokes. This is precisely where an n gets tangled with an n², and readers land on the wrong power. Stroke one is the sum, on its own, before anything is divided. Independence is what lets variances add, because Chapter 16 showed the cross-terms die when every covariance is zero. So Var(X₁ + ⋯ + Xₙ) = nσ²: total up 100 fair coin flips and the sum's variance is 100 × 0.25 = 25. Watch what that means physically before we touch it.
Slide n — the raw sum's spread grows like √n·σ (before any dividing)
typical spread ≈ 5.00 (√25)
What you're looking at — the sum alone, before anyone divides by n
blue bars = 300 simulated sums Sₙ, one per trial — this is what physically widens
gold bracket & counter = √n·σ and Var(Sₙ)=nσ² — the number driving that widening
green dashed line = E[Sₙ]=0 for every n — the centre never moves, only the spread does
This is the sum, not the average. Chapter 18's sample mean X̄ₙ has Var=σ²/n → 0 (it concentrates); this raw sum Sₙ has Var=nσ² → ∞ (it does not). Same n, opposite fate — the /n hasn't happened yet.
Fig. 14. Each Xᵢ is one fair coin worth ±1, so μ=0 and σ²=1 exactly. The bars are 300 simulated draws of Sₙ=X₁+…+Xₙ on a fixed axis that never rescales — so when you slide n up, the widening you see is real, not a trick of the axes. Because the flips are independent, Ch 16's cross-terms Cov(Xᵢ,Xᵡ) are all exactly 0, so Var(Sₙ)=nσ²=n plainly (not n²: only n diagonal terms survive) and the typical deviation is √n·σ=√n. The dashed line shows E[Sₙ]=0 never moves — only the spread grows, unboundedly, with no /n in sight yet to tame it.
The sum spreads out. Its variance grows like n, so its typical distance from its own mean grows like √n · σ. For 100 fair coin flips that is √100 × 0.5 = 5 heads. Stack more dice and the pile of plausible totals gets wider, not narrower. If your gut expected sums to self-cancel, here is the corrective. Raw sums drift outward, and the drift never stops growing. Averages are going to tighten for a subtler reason than cancellation.
Stroke two: divide by n. The scaling rule from Chapter 15 says Var(aX) = a²Var(X), so dividing a variable by n divides its variance by n². Keep the two strokes apart and let them collide only at the very end. Var(X̄ₙ) = (1/n²) · nσ² = σ²/n. For 100 coin flips the sum's variance 25 divided by n² = 10000 gives 0.0025, exactly σ²/n = 0.25/100. The n from adding and the n² from scaling never touch until that last line. Their quotient is the number this whole chapter turns on.
Stroke two — divide by n, and the collapse
n = 1 · drag, or tap the ÷n gate
Var(X̄ₙ) = σ²/n = 1.000
the same 20 trials feed both panels — only n changes
What you're looking at — one division, two different variance factors
blue dots = Sₙ, the running sum of n coin flips — adding stacks variance ×n
gold dots = X̄ₙ = Sₙ/n, the average — dividing scales variance ×(1/n)²
cyan gate = the ÷n step — the ONLY place the two factors ever meet
Aha: n·(1/n)² = 1/n — not 1/n² (scaling alone, too small) and not 1 (no shrink at all). That's why Var(X̄ₙ)=σ²/n exactly, with only ONE n left in the denominator.
Fig. 15. Twenty trials of n real fair-coin flips (Xᵢ=±1, generated fresh in your browser, σ²=1) feed both panels from the same numbers: the blue dots are each trial's sum Sₙ=ΣXᵢ, the gold dots are that same trial divided by n into the average X̄ₙ=Sₙ/n. Adding n copies multiplies variance by n (Var(Sₙ)=nσ²) — the blue counter. The ÷n gate then scales it by (1/n)², since Var(aX)=a²Var(X) with a=1/n — the gold counter. These are two separate factors that only multiply at the very end: n·(1/n²)=1/n, so Var(X̄ₙ)=σ²/n exactly — not σ²/n² and not σ². Drag n, or tap the gate: the sum's spread grows like √n while the average's spread shrinks like 1/√n — the sum never settles, only the average concentrates.
One factor of n survives, in the denominator. Var(X̄ₙ) = σ²/n, so the average's typical deviation is σ/√n, shrinking toward zero as n grows. With the coin's σ = 0.5, that is 0.05 at n = 100 and 0.025 at n = 400. Four times the data, half the error. Same data as the sum, opposite motion: the sum spreads like √n while the average tightens like 1/√n, separated by one division. That collapsing spread is the content of everything that follows.
Before we cash the collapse in, calibrate your expectations, because √n is slower than the gut wants it to be. Suppose you collect a hundred times more data. Predict how much narrower the average's histogram gets. Then check yourself below.
Predict, then reveal — 100× the data: how much narrower does the average X̄ get?
From n=1 to n=100 (100× the data), the average is how much narrower?
Pick a guess — n=100 reveals
width of X̄ = σ/√n
most say 100×. commit first, then peek.
What you're looking at — the sampling distribution of the average X̄ₙ, drawn at three sample sizes
n=1: one raw draw, spread = σ
n=10: width σ/√10 ≈ 0.32σ — 10× the data bought only ~3.2×
n=100: width σ/10 — 100× data buys just 10× (peaks drawn equal; watch the WIDTH)
Fig. 16. The average of n independent draws is unbiased — E[X̄ₙ] = μ exactly — and its variance is Var(X̄ₙ) = σ²/n, so its spread is SD(X̄ₙ) = σ/√n. Going from n=1 to n=100 is 100× the data, yet the width falls only from σ to σ/10 — a factor of 10, because √100 = 10, not 100×. Each extra digit of precision (÷10 width) costs 100× the samples: the square-root exchange rate behind polls, Monte-Carlo estimates, and lab averaging.
You just read the exchange rate forward: more data buys precision, but only at the square root. Working scientists read that rate the other way. They fix the precision they need, then ask what n it costs. Chebyshev answers directly. Set the error you will tolerate and the odds of missing it, then solve for the number of samples. For the coin, a tolerance of 0.01 with 95% confidence costs 0.25/(0.05 × 0.01²) = 50,000 flips.
Invert the law: how many samples do you need? — solve n from Chebyshev
PREDICT — then DRIVE the two knobs:
Guess: flips to pin ±1% at 95%?
Break it: drag ε to ±0.1% and watch n leap to millions.
What you're looking at — Chebyshev inverted into a price list for samples
gold needle = n = σ²/(δε²), the flips that guarantee ±ε with failure ≤δ
accuracy is the dear column: halve ε → n ×4 (the √n law, read as a budget)
confidence is cheap: halve δ → n only ×2 — linear, not squared
dim tick = the CLT requirement (Ch 18) — smaller; this Chebyshev n is a safe over-estimate
Fig. 17. Chebyshev, run backwards into a sample-size calculator. Set the tolerance ε and the allowed failure rate δ; the widget enforces P(|X̄ₙ−μ| ≥ ε) ≤ σ²/(nε²) ≤ δ and solves n ≥ σ²/(δε²), with σ²=¼ for a fair coin. Guess first: pinning a coin's rate to ±1% while missing at most 5% of the time takes 50,000 flips — from Chebyshev alone. Now drive the knobs and feel the two exchange rates: halve ε and n quadruples (the √n law, seen from the sizing side), but halve δ and n merely doubles (linear). Demand ±0.1% and n leaps to 5,000,000 — each extra digit of accuracy costs 100× the samples, while each halving of the failure odds costs only 2×. The dim tick marks the smaller CLT (Ch 18) requirement: this n guarantees enough, not the minimum.
Ten times narrower, not a hundred. The width moves as σ/√n, and √100 = 10, so a hundredfold pile of extra data buys only a tenfold tighter histogram. Precision is bought at a square-root exchange rate. Each extra digit of accuracy costs a hundredfold more samples. That rate governs every poll, every Monte-Carlo estimate, every averaged measurement in a lab, and it fell straight out of two variance rules you already owned.
One honest flag before we assemble the theorem, planted exactly where the assumption entered. Stroke one, where the variances added, needed independence. Break independence and the collapse stalls.
Correlate the trials — watch Var(X̄ₙ) refuse to reach zero
n (samples)n = 1
ρ (shared-noise correlation)ρ = 0.00
Var=1.000 ↓ no floor when ρ=0
What you're looking at — correlation puts a floor under the variance
blue curve = Var(X̄ₙ) plotted against n (log scale, 1 to a million) at the current ρ
gold dot = the exact reading at your n slider — where the curve currently sits
red = the floor ρσ²: the curve bends onto it and can never cross below
violet band = X̄ₙ's wobble around μ; its width is SD(X̄ₙ) = √Var
Aha: independent trials made the n(n−1) cross-terms in Var(ΣXᵢ) vanish, leaving Var(X̄ₙ)=σ²/n → 0. Equicorrelate them — one shared, miscalibrated instrument — and Cov(Xᵢ,Xᵡ)=ρσ² revives every cross-term: Var(X̄ₙ)=σ²(1−ρ)/n+ρσ². At ρ=0.30 that floor is already reached by about n=100 (Var=0.307, within 1% of 0.300); sliding n the rest of the way to a million buys almost nothing more. Correlated errors don't average away.
Fig. 18. Break the one assumption the Law of Large Numbers quietly needs: independence. Equicorrelate the n trials — give every pair the same correlation ρ (a shared, miscalibrated instrument is the classic cause) — and the sample mean's variance becomes Var(X̄ₙ) = σ²(1−ρ)/n + ρσ² instead of the independent-trials σ²/n. At ρ=0 the blue curve dives toward 0 exactly as Chebyshev's proof of the Weak Law promised. Raise ρ above 0 and a red floor appears at ρσ²; the curve bends onto it early and then runs flat all the way out to n = 1,000,000 — the violet band around μ stops narrowing at that same point. More data keeps buying you less and less once you're on the floor, and once there it buys you nothing at all: a shared bias in the instrument is not something averaging can ever remove.
Independence was one load-bearing assumption. There is a second, leaned on in every breath of this chapter: finite variance. Every bound here priced its tail in σ², so break that assumption too. Feed the same machine a distribution whose tail is so heavy its variance is infinite, and the collapse fails for a new reason: there is no finite σ² to shrink. The gut swears a million samples must settle any average. Here is where that instinct dies.
Two live running averages — finite variance vs. an infinite-variance tail
predict first, then press ▶ play
What you’re looking at — the same running average, run on two different worlds
left = a fair ±1 coin (σ²=1): X̄ₙ settles, its violet band ±σ/√n collapsing to 0
right = a Cauchy source (σ²=∞): X̄ₙ keeps getting yanked and never settles
gold ticks mark the rare monster draws that reset the right average — at any n
Aha: the Weak Law ran on Var(X̄ₙ)=σ²/n → 0 — but that collapse needs a finite σ² to divide down. With σ²=∞ there is nothing to shrink, so no amount of n tames the spread. Finite variance was never fine print; it is the fuel the engine burned.
Fig. 19. The twin of Fig. 18: break the other hypothesis the Law of Large Numbers quietly needs — a finite variance. First commit a prediction (“surely a million draws settle any average?”), then press ▶ play. Both panels draw a running average live in your browser. Left is a fair ±1 coin (σ²=1): X̄ₙ settles onto 0 and its violet band ±σ/√n collapses — about ±0.14 at n=50, ±0.045 at n=500. Right is a Cauchy source (σ²=∞): its running average is itself Cauchy at every n, so rare monster draws (gold ticks) keep yanking it — re-seed and it happens again, at any n. The reason is exact: the Weak Law ran on Var(X̄ₙ)=σ²/n → 0, and that collapse needs a finite σ² to divide down. With σ²=∞ there is nothing to shrink, and no reachable n tames it. Finite variance was never fine print; it is the fuel the engine burned.
Correlated errors do not average away. Correlate the trials — a shared draft in the lab, one miscalibrated thermometer feeding every reading — and Chapter 16's cross-terms come back to life inside the sum. The variance of the average now heads not to zero but to a floor of ρσ². With ρ = 0.2 and σ² = 1 that floor is 0.2, and sliding n to a million leaves the average still trembling around it. That single fact is why experimenters randomize, why redundant sensors use different hardware, and why "just collect more data" is not a cure for a shared bias. Independence isn't fine print here. It is load-bearing.
07The Law of Large Numbers
Now assemble the two engines, and notice there is no new idea left, only a substitution. Chebyshev bounds any variable's straying by its variance: P(|X̄ₙ − μ| ≥ a) ≤ Var(X̄ₙ)/a². The collapse supplies that variance: Var(X̄ₙ) = σ²/n. Substitute the collapse into Chebyshev and the bound reads P(|X̄ₙ − μ| ≥ a) ≤ σ²/(na²). Read the two letters carefully, because they play different roles. The tolerance a is yours. You fix it first, as small as you like, and from then on it sits in the bound as a constant. The n belongs to the machine. It grows without limit, it sits alone in the denominator, and nothing stops it driving the whole expression to zero.
Fix the tolerance a first, then slide n — watch the certificate collapse to zero
pick a (it locks) → drag n — only n is left to grow
n — sample sizen = —
pick a tolerance a first
What you're looking at — fix a, and only n is left to shrink the ceiling
blue line = the certificate σ²/(n·a²), Chebyshev applied to X̄ₙ at your fixed a
gold = a, the tolerance you pick first — the instant you pick it, it's a constant
cyan = n, the only thing left to grow — sliding it is the whole rest of the story
green dots = an executed batch of simulated averages — the real stray-rate, always under the line
Aha: once a is fixed it's just a number baked into σ²/(n·a²) — the only letter still in that formula is n, alone in the denominator. So the guaranteed ceiling on straying, and the actual stray-frequency underneath it, are both driven toward 0 by n and n alone. That's the Weak Law of Large Numbers: P(|X̄ₙ−μ|≥a)→0 as n→∞ — convergence in probability, named at the exact moment you watch it happen.
Fig. 20. Pick a tolerance a first — 0.05, 0.02, or 0.01 — and it turns into a constant; only then does the n-slider unlock. Chebyshev applied to the sample mean (Xᵢ=±1 coin draws, σ²=1) gives P(|X̄ₙ−μ| ≥ a) ≤ σ²/(n·a²), which is a straight line on this log-log grid — it ticks down through 1, 0.1, 0.01, and, at the loosest tolerance, on toward 0.001 as n climbs to a million. Under that line, every slide of n runs an actual batch of simulated sample averages and measures the real fraction that strayed past a; because Chebyshev's bound is famously loose, that measured dot sits well clear of the line, under it the whole way. With a pinned down, n is the only thing left in the denominator of the certificate — which is exactly why both the guaranteed ceiling and the measured reality are driven to zero by n alone. This is the Weak Law of Large Numbers: X̄ₙ concentrating on μ, convergence in probability.
Hold a fixed and slide n. The certificate σ²/(na²) ticks down through 0.1, then 0.01, then 0.001, each tenfold drop bought by ten times the n. The measured frequency of simulated runs that actually strayed past a stays obediently underneath it the whole way. That is the Law of Large Numbers, and you have just proven it: for any distribution with finite variance, and any tolerance a > 0, P(|X̄ₙ − μ| ≥ a) → 0 as n → ∞. The sample mean is pinned to μ. The pinning has an official name, X̄ₙ converges to μ in probability, and the phrase means exactly what the bound says. The odds of being caught outside any fixed tolerance shrink to zero.
The theorem is a statement about probabilities, so the honest picture of it is not one run. The honest picture is many runs at once.
CodeRun — a crowd of running-average paths, replayed live
80 paths · band ±0.057 at n=300
path #1 stayed inside all the way
What tightens is the band — never any single path inside it
μ = 0.5, the fair coin's true long-run share — pinned forever, never moves
the ≈95% band = μ ± 1.96·σ/√n (σ=0.5) — ±0.20 at n=25, ±0.057 at n=300
one traced path is free to wander, even to graze outside — only the band must shrink
Fig. 21. Eighty independent coin-flip streams, each plotted as its own running average X̄n against n — a real population, genuinely simulated, not eighteen hand-drawn wiggles. The gold band is μ ± 1.96·σ/√n with σ=0.5: about ±0.20 wide at n=25, only ±0.057 by n=300 — it shrinks because SD(X̄n)=σ/√n, nothing more exotic. Hit follow one path and watch it wander on its own schedule — sometimes it clears the whole corridor without ever touching an edge, sometimes it grazes outside for a stretch before n drags it back. Either way changes nothing about the band: the theorem was never a promise about that one line, only about the shrinking corridor the whole crowd is forced into. That's why a single stray run never refutes the LLN — the guarantee grips the population, not the wiggle.
Re-seed a whole crowd of running averages and watch them as a population. Every path wiggles its own private way, and no individual path is ever forbidden from wandering. What tightens is the band: the corridor around μ holding, say, 95% of the paths at each n, narrowing like σ/√n. With the coin's σ = 0.5, that corridor scale halves from 0.05 at n = 100 to 0.025 at n = 400. The theorem's grip is on the band, never on any single line inside it. Keep that distinction warm. It is the exact shape of the promise, and the last section spells out what the promise does and does not include.
08What it promises — and what it doesn't
File the result carefully, because the LLN is misquoted more than almost anything in mathematics. Centering is not the law. The collapsing variance is. The claim E[X̄ₙ] = μ is not the law, just free bookkeeping from linearity, already true at n = 1, and the two-spike world showed that centering alone guarantees nothing at all. The law is the collapse: Var(X̄ₙ) = σ²/n → 0, converted by Chebyshev into a vanishing tail. Say it as a slogan and keep it: centered is free; concentrated is earned.
The filing infographic — which half is actually the law?
tap a card, or ⓘ, to reveal the reasoning
which column is actually the law?
pick one — which is the law?
Two halves of one sentence — only one of them is doing any work
CENTERED — E[X̄ₙ]=μ exactly, for every n; free from linearity, proves nothing about n→∞.
CONCENTRATED — Var(X̄ₙ)=σ²/n→0; Chebyshev turns this into a vanishing tail. This IS the law.
Only convergence in probability: no leash on any one run, weaker than a calculus limit.
Fig. 22. Two case files, filed side by side. CENTERED — E[X̄ₙ]=μ exactly, for any n — is true on the very first flip; tap the card and two spikes of wildly different width still land on the same μ, because centering is a free consequence of linearity, never a limit anyone had to earn. CONCENTRATED — Var(X̄ₙ)=σ²/n→0 — is the entire content: tap it for the collapsing strip and the exact numbers Chebyshev buys at a=σ, P(|X̄ₙ−μ|≥σ)≤1/n, falling 1, .25, .04, .01 as n runs 1, 4, 25, 100. Guess which column is "the law" below and the same correction lands either way — CENTERED dims because it never was, CONCENTRATED holds because it always was. And even that vanishing tail only buys convergence in probability: no leash on any one run, and a weaker sense of "converges" than the one from calculus.
And "converges in probability" is a promise about odds, not a leash on your particular run. A long fair-coin experiment can still sit at 0.53, three points above μ — nothing forbids it, and rarely, one run will. The law says only that the probability of such straying shrinks toward zero as n grows. Notice that the word "converges" wears a weaker meaning here than it wears in calculus. It does not mean the sequence must enter a band and stay. It means the odds of being outside that band go to zero. The gambler's fallacy dies here a second time, too: the average is not pulled back by a coin remembering its debts. Wanderers are simply diluted, and become rare.
Now stand back and see what you actually built, because it was one move all along. Markov is a crude tail bound priced from the mean, by the counterweight law. Chebyshev is Markov fired at the squared deviation, with the variance entering by definition. The LLN is Chebyshev fired at the sample mean, with σ²/n entering from the collapse. Three results, one template: aim a crude bound at a cleverly chosen non-negative variable. Sharper choices of that variable power half of modern probability, and you can now re-derive all three links by hand, from nothing.
Map so far — one bound, fired three times, then a new question
same X: μ=4, σ²=9 — n=100, ε=1 for the LLN firing
P(X≥8) ≤ E[X]/8 = 0.50
What you're looking at — one inequality, aimed three times
blue ring = the non-negative variable Y each firing is aimed at — X, then (X−μ)², then (X̄₃₀₀−μ)².
gold centre = what walked into Markov's numerator, E[Y] — μ, then σ² by definition, then σ²/n from the collapse.
green bracket = this chapter, Ch 17 — all three firings are one template, aimed differently each time.
violet = Ch 18's open question — the LLN nails the centre; what SHAPE fills the σ/√n band still needs the MGF.
Every bound above is Markov's P(Y≥a)≤E[Y]/a, fired at a cleverer Y: Chebyshev is Markov aimed at (X−μ)²; the LLN is that same move aimed at the sample mean, where the /n finally shrinks the bound to 0. One idea, not three — better ammunition, same gun.
Fig. 23. The same crude bound, P(Y≥a)≤E[Y]/a, fired three times at a cleverer Y — tap a target. Markov aimed at X itself bounds P(X≥8)≤0.50; Chebyshev aims it at (X−μ)² and gets P(|X−4|≥6)≤0.25; the LLN aims it at the sample mean and gets 0.09 — and that one keeps shrinking as n grows, because it's the only firing with n in the barrel. Ch 18's open question: the centre is nailed, but what shape fills the σ/√n band?
One thing the summit has not given us, and it is the cliff edge Chapter 18 steps off. The LLN says where the average lands: on μ, inside a band that scales like σ/√n. It says nothing about the shape of the scatter inside that band. And astonishingly, that shape turns out to be universal. Start from almost any distribution you like, standardize the average, and the scatter bends toward one particular bell. Proving that needs one genuinely new tool: a transform that turns sums of variables into products of functions, so the hard convolution becomes easy multiplication. That tool is the moment-generating function, and it is where we go next.