TwiddleLab / Math / Probability by Simulation
At Least One: The Complement Trick
What you will learn
- The complement of an event is everything else: P(not A) = 1 − P(A).
- At least one = 1 − none. None is a single path, so multiply along it: (5/6) to the power 4 = 0.48.
- Each extra try multiplies "none" again, so it shrinks fast: 4 rolls pass 50%, 13 pass 90%.
How the lesson goes
Roll a die 4 times. Is at least one 6 more likely than not?
Drag the pin to your bet for the chance of at least one 6.
Four rolls make 16 paths. Only one has no 6 at all.
Each column is one roll. Red is a 6, green is not. Height is chance. Tap the leaf with no 6.
The no-6 path is 5/6 × 5/6 × 5/6 × 5/6 = 625/1296, about 0.48. Every other path has at least one 6, so together they are 1 − 0.48 = 0.52: just over half.
Turn the number of rolls.
Each roll multiplies "no 6" by 5/6 again. Hit each goal with the fewest rolls.
No 6 in n rolls is (5/6) to the power n. It drops below 0.5 at n = 4 (0.48), below 0.25 at n = 8 (0.23) and below 0.1 at n = 13 (0.09).
The complement trick.
The complement of an event is everything else. Together they make 1: P(not A) = 1 − P(A).
At least one has many paths. None has one. So P(at least one) = 1 − P(none).
None is one path through independent rolls, so multiply along it: (5/6) × (5/6) × (5/6) × (5/6).
Roll 1000 sets of four.
Each cell is one set of four rolls. Gold means at least one 6. Is it really about 52%?
Game: loot planner.
Three shops, 40 coins. Plan the fewest crates that pass each goal, then Buy. Fewest crates earn 3 stars.
Nothing in n crates at 1 in 10 is 0.9 to the power n: 0.53 at 6 crates and 0.48 at 7. So 7 crates are the fewest for over 50%. At 1 in 4, 0.75 to the power 9 = 0.075; at 1 in 20, 0.95 to the power 14 = 0.49.
An AI model is right 99% of the time.
It writes 100 answers in a run. In what share of runs does it make at least one mistake? Pin your guess, then Run.
A run is perfect only if all 100 answers are right: 0.99 to the power 100 = 0.37. So 1 − 0.37 = 0.63 of runs have at least one mistake.
At least one 6 in 3 rolls: which leaf do you take away from 1?
Now every leaf is drawn the same height, so you have to read the paths. n means not 6.
No 6 in three rolls is 5/6 × 5/6 × 5/6 = 125/216. Everything else, 91/216 or about 0.42, has at least one 6.
Teaser: 23 people in a room.
What is the chance two of them share a birthday? Pin it, then fill the room.
All different is 365/365 × 364/365 × ... × 343/365 = 0.49, so a shared birthday is 1 − 0.49 = 0.51. With 23 people there are 253 pairs, each one a chance to match.
Previous lesson: Trees of Chance · Next lesson: Given That... · Part of the course: Probability by Simulation
Lessons are interactive and need JavaScript. Turn it on to play them.