Probability Trees — Mapping Every Outcome
Visualising conditional probability step by step
Two Events, One Tree
A probability tree maps every outcome of a two-stage experiment. The 'Start' node on the left splits into two branches: the upper green one leads to A, labelled P(A) = 0.30, and the lower orange one to ¬A, labelled P(¬A) = 0.70. They add to 1 because A either happens or it doesn't. Think of A as rain tomorrow: the first split covers both kinds of day. Press 'Next Stage ▸' whenever you are ready to grow the tree.
Branching Further: Conditional Probability
Each first-stage node branches again for event B. The new labels are conditional probabilities: P(B|A) = 0.60 is the chance of B once you know A happened, and P(B|¬A) = 0.20 is the chance of B once you know A did not. Each pair leaving a node sums to 1. Notice the two pairs differ: knowing A changes the odds of B, so the events are dependent. Move the 'P(B|A)' slider and only the upper pair of branches changes.
Leaves: Joint Probabilities
Each of the four ringed leaves on the right is one joint outcome, and its probability is the product along its path. The moving dot traces Start → A → A ∩ B, and that leaf reads 0.3 × 0.6 = 0.18 — the multiplication rule P(A ∩ B) = P(A) · P(B|A). The line under the tree confirms the four leaves always sum to exactly 1. Multiplying makes sense: B|A happens on 60% of the 30% of runs that reach A.
Reading Off P(B): Total Probability
Two different paths end in B — one through A, one through ¬A — and both B leaves are now ringed. The Law of Total Probability adds them: P(B) = P(A)·P(B|A) + P(¬A)·P(B|¬A), written out at the top left. Move the 'P(A)' slider: P(B) shifts because more of the weight now flows down the branch with the higher chance of B. P(B) always lands between P(B|¬A) and P(B|A), a weighted average of the two.
Worked Example: P(A) = 0.3, P(B|A) = 0.6
Take P(A) = 0.3, P(B|A) = 0.6 and P(B|¬A) = 0.2, the default sliders. The A path gives P(A ∩ B) = 0.3 × 0.6 = 0.18. The ¬A path has P(¬A) = 1 − 0.3 = 0.7, so P(¬A ∩ B) = 0.7 × 0.2 = 0.14. Adding the two paths, P(B) = 0.18 + 0.14 = 0.32. The other leaves are 0.12 and 0.56, and all four sum to 1. Press 'Load worked example' to bring these numbers back after exploring.
Turning the Tree Around: P(A | B)
Once you learn that B happened, only the two ringed B leaves are still possible. The share of that total that came through A is P(A | B) = P(A ∩ B) / P(B) = 0.18 / 0.32 ≈ 0.56, shown in the highlighted card. That is Bayes' theorem read straight off the tree. Set the 'P(B|¬A)' slider lower and watch P(A | B) climb. This is how a positive test result is judged: the rarer false positives are, the more a positive result means.
How It Works — Step by Step
-
1
Two Events, One Tree
A probability tree maps every outcome of a two-stage experiment. The 'Start' node on the left splits into two branches: the upper green one leads to A, labelled P(A) = 0.30, and the lower orange one to ¬A, labelled P(¬A) = 0.70. They add to 1 because A either happens or it doesn't. Think of A as rain tomorrow: the first split covers both kinds of day. Press 'Next Stage ▸' whenever you are ready to grow the tree.
-
2
Branching Further: Conditional Probability
Each first-stage node branches again for event B. The new labels are conditional probabilities: P(B|A) = 0.60 is the chance of B once you know A happened, and P(B|¬A) = 0.20 is the chance of B once you know A did not. Each pair leaving a node sums to 1. Notice the two pairs differ: knowing A changes the odds of B, so the events are dependent. Move the 'P(B|A)' slider and only the upper pair of branches changes.
-
3
Leaves: Joint Probabilities
Each of the four ringed leaves on the right is one joint outcome, and its probability is the product along its path. The moving dot traces Start → A → A ∩ B, and that leaf reads 0.3 × 0.6 = 0.18 — the multiplication rule P(A ∩ B) = P(A) · P(B|A). The line under the tree confirms the four leaves always sum to exactly 1. Multiplying makes sense: B|A happens on 60% of the 30% of runs that reach A.
-
4
Reading Off P(B): Total Probability
Two different paths end in B — one through A, one through ¬A — and both B leaves are now ringed. The Law of Total Probability adds them: P(B) = P(A)·P(B|A) + P(¬A)·P(B|¬A), written out at the top left. Move the 'P(A)' slider: P(B) shifts because more of the weight now flows down the branch with the higher chance of B. P(B) always lands between P(B|¬A) and P(B|A), a weighted average of the two.
-
5
Worked Example: P(A) = 0.3, P(B|A) = 0.6
Take P(A) = 0.3, P(B|A) = 0.6 and P(B|¬A) = 0.2, the default sliders. The A path gives P(A ∩ B) = 0.3 × 0.6 = 0.18. The ¬A path has P(¬A) = 1 − 0.3 = 0.7, so P(¬A ∩ B) = 0.7 × 0.2 = 0.14. Adding the two paths, P(B) = 0.18 + 0.14 = 0.32. The other leaves are 0.12 and 0.56, and all four sum to 1. Press 'Load worked example' to bring these numbers back after exploring.
-
6
Turning the Tree Around: P(A | B)
Once you learn that B happened, only the two ringed B leaves are still possible. The share of that total that came through A is P(A | B) = P(A ∩ B) / P(B) = 0.18 / 0.32 ≈ 0.56, shown in the highlighted card. That is Bayes' theorem read straight off the tree. Set the 'P(B|¬A)' slider lower and watch P(A | B) climb. This is how a positive test result is judged: the rarer false positives are, the more a positive result means.
Key Takeaways
The Multiplication Rule
Joint probability equals the product along a path. P(A ∩ B) = P(A) · P(B|A). Always multiply probabilities as you move down the branches.
Leaf Probabilities Sum to One
No matter how you set P(A), P(B|A), and P(B|¬A), the four leaf probabilities always add up to exactly 1 — because they partition the entire sample space.
Total Probability Adds the Paths
To find P(B), add every leaf that ends in B: P(B) = P(A)·P(B|A) + P(¬A)·P(B|¬A). With 0.3, 0.6 and 0.2 that is 0.18 + 0.14 = 0.32.
The Path to Bayes
Once you can read joint probabilities from the tree, Bayes' theorem is just arithmetic: P(A|B) = P(A ∩ B) / P(B), both of which appear directly on the tree.
Connected Concepts
Bayes' Theorem
Probability trees are a visual gateway to Bayes' theorem — they make the multiplication rule concrete before the formula takes over.
Binomial Distribution
When you repeat a two-outcome experiment many times, the probability tree grows into the binomial distribution.
Markov Chains
Every arrow in a Markov chain is a conditional probability — unroll the chain step by step and it becomes a probability tree.
Monty Hall Problem
Draw the tree for the car, your pick and the host's door, and the case for switching becomes plain.
Decision Tree
A decision tree splits data by questions, just as this tree splits outcomes by events.
Expected Value
Put a payoff on each leaf, weight it by the leaf's probability and add them up to get the expected value.
Updated
- — Steps now explain dependence, why paths multiply and where P(B) can land; three new connections.
- — Stages now wait for you, the tree shows a worked example (0.3 × 0.6 = 0.18) and P(B), and a Bayes step.