A fair coin has just shown five heads in a row. Is tails now due? Guess, then watch 10 000 flips.
A coin has no memory
10 000 flips of a fair coin, made by a computer (seed 1500).
10 000 flips of a fair coin go past. Each flip that comes straight after five heads in a row joins the tally below.
Predict first. After five heads in a row, is the next flip more likely tails, equally likely, or more likely heads?
Describe this picture
A row of 10 000 seeded flips of a fair coin (seed 1500) scrolls past a reading head marked “newest”: filled dots for heads, open rings for tails. Before the clip, a question asks: after five heads in a row, is the next flip more likely tails, equally likely, or more likely heads? Three small bar drawings answer it, and a tap picks one and starts the clip. The row slides to each of the first four flips that come straight after five heads (flips 69, 176, 203 and 204), brackets the five heads, and drops the flip into a tally below: one bar, heads in the accent colour from the left and tails from the right, with a dashed mark at one half. Then the other flips go by fast. Readouts give the flips so far, the flips after the streak and the share of heads among them; at the end, 318 flips followed five heads, 157 heads and 161 tails, a share of 0.494, and your guess is a dotted outline over the part of the bar it named. After the clip a slider, “Heads in a row before the flip”, sets the streak from 1 to 7, and the tally is redone.
Flips after a streak
Before the clip you guessed. Many people feel that after five heads, tails is due: the coin has to even things out. The tally says no. Of the flips that came straight after five heads, about half were heads.
How many such flips are there? Each of the 9995 flips from the sixth on has five flips before it, and those five are all heads with chance . So about flips land in the tally; in the clip, 318 did. Inside a long run of heads, several flips in a row count.
With about 312 flips, the typical miss of What probability measures says the share of heads should land within about of one half. The tally’s share does: 157 heads and 161 tails, a share of 0.494.
After the clip, drag the streak length. After one head, about 5000 flips land in the tally and the share hugs one half, within about 0.007. After seven heads, only about 78 flips land there and the share wobbles more, about 0.057; in the clip’s flips, 83 landed there, 47 of them heads, a share of 0.566. But it wobbles around one half, with no lean towards tails.
Watch out
After a streak, the opposite result is not “due”. This mistake is called the gambler’s fallacy. The coin does not know what it did before; a long run evens out only because the many flips still to come swamp the streak, not because they correct it.
Independent events
The tally measured a conditional probability. With “this flip is heads” and “the five flips before it were heads”, it found
Learning did not change the chance of . Two events like that are independent.
Put into the multiplication rule of Conditional probability, , and you get the usual definition:
This form has two advantages. It is symmetric, so if tells nothing about , then tells nothing about . And it still makes sense when .
For coin flips, independence is the reason the chance of five heads in a row is : each flip’s chance multiplies, untouched by the others.
Independent is not the same as mutually exclusive
Two events that cannot happen together are called mutually exclusive: . This is the “disjoint” of What probability measures. It sounds like “having nothing to do with each other”, but it is close to the opposite of independence.
Roll one die. Let be “it shows 6” and be “it shows 1”. They are mutually exclusive. Are they independent? Learning that happened tells you for certain that did not: , not . In the product form, but .
Two mutually exclusive events, each with a chance above zero, are never independent: one happening rules the other out.
Independence and two dice
Independence is a fact about numbers, and it does not always look like it from the story. Roll two dice. Is the event “the first die is even” independent of the sum?
Independence, counted on two dice
The 36 pairs of two fair dice; the first die picks the row, the second the column.
Two dice: 36 pairs, all equally likely; the first die picks the row, the second the column.
Describe this picture
The 36 rolls of two dice as a 6 by 6 grid of cells, the first die down the side and the second die across the top, each cell showing its sum. The clip lights the 6 cells whose sum is 7, one by one, and a bar shows “all 36 pairs: 6 add to 7”. Then the rows of an odd first die fade, leaving the 18 rolls whose first die is even, and a second bar shows “first die even, 18 pairs: 3 add to 7”; both bars share a scale marked 0, 1/12, 1/6 and 1/4. Readouts give the sum, its chance among all 36 rolls (6/36 = 0.167) and its chance given an even first die (3/18 = 0.167). After the clip a slider, “Sum of the dice”, sets the sum from 2 to 12, and the caption says whether the two chances are the same.
Take a sum of 7. Among all 36 rolls, 6 give 7, a chance of . Among the 18 rolls whose first die is even, 3 give 7: (2, 5), (4, 3) and (6, 1). That is again. Learning that the first die is even tells you nothing about whether the sum is 7, so the two events are independent.
Now take a sum of 8. Among all rolls, 5 give 8: a chance of . Among the 18 with an even first die, 3 give 8: (2, 6), (4, 4) and (6, 2), a chance of , which is larger. Here the first die being even makes a sum of 8 more likely, so these two events are not independent.
After the clip, drag the sum through every value. Every odd sum, 3, 5, 7, 9 and 11, comes out independent of “first die even”: exactly half of its rolls have an even first die. Every even sum does not. Nothing in the dice story hints at that split; only the counts show it.
More than two events
For three events, it is not enough that each pair is independent. Flip two fair coins. Let be “the first is heads”, “the second is heads” and “the two coins agree”.
Each event has chance , and each pair happens together with chance : is heads-heads, is heads-heads, is heads-heads. Since , every pair is independent.
But all three together are also just heads-heads, with chance , not . Knowing and tells you for certain.
So three events are called mutually independent only when every pair factors and the triple does too:
For more events, every group of two or more must factor in the same way. Separate flips of a coin are mutually independent in this full sense.
Worked example
A machine needs a part that works with chance 0.95 over a year. I assume parts fail independently of each other. Call the chance that part works its reliability, .
1. Three parts in series. The machine needs all three to work, like links in a chain. By independence,
Adding parts in series makes the whole less reliable than any one part.
2. Three parts in parallel. Now any one of three parts is enough, like three spare power supplies. The machine fails only if all three fail, each with chance 0.05:
3. Ten parts in series at 0.99 each: . Ten good parts make a chain that fails about one year in ten.
4. Spares or a better part? Which fails less often: three parts at 0.95 in parallel, or one part at 0.999? The three: . Here, three ordinary parts that fail independently beat one excellent part. But only if they really fail independently: three power supplies on the same overloaded cable can fail together.
Try it yourself. A coin has landed heads ten times in a row. The chance of heads on the next flip is still .
Where you’ll meet this
Redundant systems. Spare power supplies, the extra engines of an aircraft and disk arrays that store each file on several disks all use the parallel rule. Designers spend most of their effort making sure the copies really fail independently: different power, different cables, different places.
Chains of parts. A circuit board, a supply chain or a long data link works only if every link does: the series rule. Long chains need very reliable links.
Random noise and random numbers. Noise in a signal is often modelled as a fresh, independent random value at every moment, called white noise; Random processes in the signal processing course builds on it. Simulations and security rely on random bits being independent of each other, so that no bit gives away the next.
Long runs. Independence does not mean that a long run corrects itself, as the warning above says. What it does give is The law of large numbers: over many independent flips, the share of heads settles near one half.
Reference card
| Quantity | Formula | Notes |
|---|---|---|
| Independent | learning one tells nothing about the other | |
| Same thing, as a condition | when | |
| Mutually exclusive | never independent if both chances are above 0 | |
| Mutually independent | every pair and every larger group factors | pairwise is not enough |
| Series | all must work | |
| Parallel | one is enough | |
| After a streak | next flip still | the gambler’s fallacy |