Skip to content
LoveToCalc

Tree diagrams

A random experiment in several steps drawn as branches: multiply along the branch, add across the branches.

What the diagram shows

A tree diagram draws a random experiment that happens in steps. From a starting point a branch goes to each possible outcome of the first step, and from each of those outcomes new branches go to the outcomes of the next step. Each branch carries the probability of its outcome, given what has happened before it on the same path. The branches leaving one point add up to 1, and a path from start to end is one outcome of the whole experiment.

3/52/4RR2/4RB2/53/4BR1/4BB
A bag with 3 red and 2 blue marbles. Two marbles are drawn, the first one not put back. R stands for red and B for blue, and RB means red first, then blue.

In the example the first draw is red with probability 3/5 and blue with 2/5. If a red marble has been drawn, 2 red and 2 blue are left, so the second draw is red with probability 2/4. If a blue one has been drawn, 3 red and 1 blue are left.

How to calculate

With and without replacement

If the first marble is put back, the bag is the same for the second draw, and the branches of the second step get the same probabilities as those of the first. Two reds then come to 3/5 · 3/5 = 9/25. The draws are independent: the outcome of the first does not change the probabilities of the second.

Without replacement, the probabilities of the second step depend on the first, and they differ from branch to branch. That is what the tree diagram makes visible: each branch carries the probability that holds at that point.

When it fits and when it does not

A tree diagram fits experiments with few steps and few outcomes at each step, and especially when the probabilities change between the steps or the order matters.

It fits less well when:

Common mistakes

Going deeper: total probability and turning the tree around

The probability that the second marble is red can be read from the tree: two paths end with a red marble, red–red and blue–red, so it is 6/20 + 6/20 = 12/20 = 3/5. That is the law of total probability: the probability of an event is the sum over all the paths that lead to it. The answer, 3/5, is the same as for the first marble, even though the second draw depends on the first. Without knowing how the first draw went, each marble in the bag is as likely to end up in second place as in first.

The tree can also be read backwards. If the second marble is red, how likely is it that the first was too? Of the probability 12/20 for a red second marble, 6/20 comes from the path red–red, so the answer is (6/20)/(12/20) = 1/2. That is Bayes’ theorem, worked out straight from the tree.

See also

More articles

Updated November 7, 2026