The idea: draw every way it can go

A bag holds 3 red and 2 blue marbles. You draw one, keep it, and draw a second. What is the chance both are red? A probability tree answers this by drawing every way the experiment can go. The root is the start. The first level has one branch per outcome of the first draw, the second level one branch per outcome of the second draw. Each path from the root to a leaf is one complete outcome, and each branch carries its probability.

Probability tree for two draws without replacement from 3 red and 2 blue marbles. First draw: red 3/5, blue 2/5. After red: red 2/4, blue 2/4. After blue: red 3/4, blue 1/4. Leaves: RR 3/5 × 2/4 = 3/10, RB 3/10, BR 3/10, BB 2/5 × 1/4 = 1/10, adding up to 1.
Multiply along a path to get one outcome's probability; the four leaves add up to 1.

Branches out of a node add to 1

The branches leaving one node cover every possibility from that point, so their probabilities add to 1: 3/5 + 2/5 = 1 at the root. The second-level branches are conditional probabilities. After a red marble is drawn, 2 red and 2 blue are left, so the branches are P(2nd red | 1st red) = 2/4 and P(2nd blue | 1st red) = 2/4. After a blue one, 3 red and 1 blue are left: 3/4 and 1/4. Each pair adds to 1 again (Demo: marbles without replacement, press Build Tree).

Multiply along a path

A path is "this happened, and then that happened". Its probability is the product of the branches on it: the multiplication rule P(A and B) = P(A) × P(B | A). Red then red is 3/5 × 2/4 = 3/10. The four leaves get 3/10, 3/10, 3/10 and 1/10, and they add to 1, because every outcome follows exactly one path (Demo: two coin flips, multiply along: four leaves of 1/4).

Add across the leaves

An event is a set of leaves. Different leaves are different outcomes, so they cannot happen together, and the event's probability is the sum of its leaves. "Same colour" is RR or BB: 3/10 + 1/10 = 2/5 (Demo: marbles without replacement, same colour). "At least one head" with two coins is HH, HT or TH: 1/4 + 1/4 + 1/4 = 3/4, which is also 1 − P(TT), the complement (Demo: at least one head).

RuleWhere on the treeWords
multiplyalong one path"and then"
addacross several leaves"or"
divideleaves in A and E, over leaves in E"given"

Independent or dependent stages

Put the first marble back before the second draw. Now the bag is the same both times, so the second-level branches are 3/5 and 2/5 on both sides. Two stages are independent when the second-level branches do not depend on which first-level branch you are on: P(B | A) = P(B), and the multiplication rule becomes P(A and B) = P(A) × P(B). Without replacement the branches differ (2/4 vs 3/4 for red), so the draws are dependent.

Two trees side by side. Without replacement: after red the second branches are 2/4 and 2/4, after blue 3/4 and 1/4, different, so dependent. With replacement: after red and after blue the second branches are both 3/5 and 2/5, the same, so independent; leaves 9/25, 6/25, 6/25, 4/25.
Independent stages have the same second-level branches on every side of the tree.

Reading the tree backwards: Bayes

The tree is drawn in time order: first draw, then second. Often you learn the second stage and ask about the first: the second marble was red, how likely was the first one red? Condition on the event E = "2nd is red": keep only E's leaves (RR 3/10 and BR 3/10, total P(E) = 3/5) and ask what share of that total starts with red:

P(1st red | 2nd red) = P(1st red and 2nd red) / P(2nd red) = (3/10) / (3/5) = 1/2

That is Bayes' theorem, with P(E) found by adding across the tree (the law of total probability) (Demo: reverse the tree). With replacement the same question gives 3/5, exactly P(1st red): for independent stages, seeing the second tells you nothing about the first (Demo: with replacement).

The medical test is the famous case. 1% of people are sick; the test finds 90% of them and wrongly flags 9% of healthy people. The positive leaves are sick-and-positive 0.01 × 0.9 = 0.009 and healthy-and-positive 0.99 × 0.09 = 0.0891, so P(+) = 0.0981 and

P(sick | +) = 0.009 / 0.0981 ≈ 0.0917

only about 9%, because the healthy branch is so much bigger (Demo: medical test, Bayes from a tree). The Monty Hall problem is solved with the same kind of tree.

Common mistakes

  • Using the first-draw probabilities again on the second level when the draws are without replacement. The bag changed; the branches change.
  • Adding along a path or multiplying across leaves. Along is "and then" (multiply); across is "or" (add).
  • Confusing P(+ | sick) = 0.9 with P(sick | +) ≈ 0.09. The tree gives the first directly; the second needs the division.

What the page leaves out

Trees with three or more stages or more than two outcomes per node (the rules are the same; the tree just grows like the product of the branch counts), counting with equally likely leaves (Pascal's triangle counts the paths of a coin-flip tree), and continuous outcomes, where a tree turns into densities and integrals. Networks of many dependent variables are Bayesian networks.

On the mind map

This page on the Probability & Statistics mind map · 22 pages in 5 branches · open it to see the whole map and test yourself in recall mode.