How to solve Bayes’ theorem problems with a tree diagram

If you roll a six, would that make you more likely to think you picked a weighted die? Bayes’ theorem lets us put a number on that change. We’ll work through the calculation and see the same answer in a tree diagram.

Reverse the conditional probability

The notation P(A∣B) means the probability of A given B. It can be different from P(B∣A), which switches the roles of the two events. If P(A)>0 and P(B)>0, Bayes’ theorem gives

P(A∣B)=P(B∣A)·P(A)P(B)

The numerator is the probability that both events happen. The denominator is the probability of the event we already know happened, so it keeps only the outcomes we’re conditioning on.

Example: Which die was more likely to roll the six?

Choose one of two dice at random. One is fair and rolls a six with probability 16. The other is biased and rolls a six with probability 12. You roll the chosen die once and get a six. We want P(biased∣6).

Probability tree for choosing a die and rolling a sixChoose either die with probability one half. A biased die gives six with conditional probability one half, and a fair die gives six with conditional probability one sixth. The paths ending in six have probabilities one fourth and one twelfth.Pick a dieBiasedFair1/21/21/21/21/65/6Roll 61/4No 61/4Roll 61/12No 65/12
The blue boxes are the two paths that end in a six. Their probabilities are 1/4 and 1/12.

Multiply along each path. The biased die and a six has probability 12·12=14. The fair die and a six has probability 12·16=112. A six can come from either die, so add those two probabilities.

P(6)=14+112=13

Compare the biased path with all paths that end in six

Now we can divide the probability of the biased-and-six path by the probability of rolling a six.

P(biased∣6)=1413=34=75%

Before the roll, each die was equally likely. After seeing a six, the biased die is more likely because it rolls six three times as often as the fair die does. The tree keeps track of that difference with probabilities on its branches. All the outcomes other than six can share one branch for each die.