TwiddleLab / Math / Probability by Simulation
Trees of Chance
What you will learn
- A probability tree splits at every fork. A branch's thickness is its chance.
- Multiplication rule: the chance of a whole path is the product along it: 1/10 × 1/4 = 1/40.
- Big first branches can lose to strong second ones: always multiply the whole path.
How the lesson goes
Your phone dies 1 day in 10. The bus is late 1 day in 4.
How often do both ruin your morning? Paint that many days of 100.
Grow the tree of your mornings.
Tap the root to split it by the phone. Then tap each branch to split it by the bus. Thickness is chance.
Of the 1 day in 10 when the phone dies, the bus is late on 1 in 4 of those. A quarter of a tenth is a fortieth: 0.1 × 0.25 = 0.025.
Drop 1000 mornings through the tree.
Each morning picks a branch at each fork. Does the thin leaf really catch about 25?
Multiply along the path.
A probability tree splits at every fork into branches whose chances add up to 1.
Multiplication rule: a path's chance is the product of its branches. P(A and B) = P(A) × P(B), when A and B are independent.
The four leaves add up to 1: one of them happens every morning.
Make your own morning tree.
Pick two things that can go wrong for you, and dial how often each one happens.
Your top leaf is the product of your two dials, as long as the two things don't affect each other.
Game: thickest leaf.
Every branch is drawn the same width. Tap the leaf you think is most likely, then see the real thickness. Get 3 of 4.
A language model builds phrases the same way.
After "I", each next word has a chance. Tap words to build three-word phrases. Lock in the most likely one.
P(I am not) = P(am after I) × P(not after I am) = 0.5 × 0.5 = 0.25, more than 0.3 × 0.6 = 0.18 for I love you.
It rains 1 day in 3. You forget your umbrella 1 day in 2. Out of 60 days, how many are you caught wet?
Being wet needs rain and a forgotten umbrella. Multiply: 1/3 × 1/2 = 1/6, and 60 / 6 = 10.
A thousand of your mornings.
Your tree from before. Drop them and get your card.
Previous lesson: Independent or Not? · Next lesson: At Least One: The Complement Trick · Part of the course: Probability by Simulation
Lessons are interactive and need JavaScript. Turn it on to play them.