Explainer: Conditional Probability: Tree Diagrams

In this explainer, we will learn how to use tree diagrams to calculate conditional probabilities.

When working out probabilities for more than one event, it can be helpful to illustrate the problem using a tree diagram. These can be particularly useful when we are looking at conditional probabilities. (Recall that the conditional probability of event 𝐡 is the probability of event 𝐡 given that event 𝐴 has occurred and is written as 𝑃(𝐡∣𝐴).)

In our first example, we will use a tree diagram to calculate probabilities for selection without replacement.

Example 1: Compound Probability, Taking Two Balls from a Bag without Replacement

A bag contains 22 red balls and 15 black balls. One red ball is removed from the bag and then a second ball is drawn at random. Find the probability that the second ball is black. Give your answer to three significant figures.

Answer

To find the probability that the second ball drawn is black, we note that since the second ball is drawn without replacing the first, the probability of the second being black is dependent on what happens in the first selection. And to calculate our second probability, we first need to work out the probability that the first ball selected is red.

To begin, there are 22 red balls and 15 black ones, so there are 22+15=37 balls in total. The probability of drawing a red ball from the bag on our first pick is, therefore, 𝑃()==2237.Rednumberofredballstotalnumberofballs

We can draw the first branches in our tree diagram using this information.

Notice that the probabilities, which are on the two branches, add up to 1. This must be true for each set of branches in the tree diagram since, at every stage, all possible outcomes are covered by each set of branches.

Since we are keeping the first ball out of the bag, there is one less ball in the bag in total, so there are now 36 balls in the bag. Of those 36, there is one less red, so 21 red balls remain in the bag.

From each of the first branches, we now have two possible outcomes for our second selection. The second ball could be either red or black. Let us complete our tree diagram with all possible outcomes for the second selection.

The probability that the second ball is black is found by multiplying the probabilities on the branches corresponding to β€œfirst ball red” and β€œsecond ball black”: 𝑃=(∩)=Γ—=2237Γ—1536=22Γ—1537Γ—36=3301,332=0.2483.RedBlackredballsinitiallytotalballsinitiallyblackballstotalballslefttosig-

The probability that the second ball drawn is black, having already drawn a red ball, is therefore 0.248. We can say that there is approximately a 25% chance of selecting a red ball and then a black ball (since 0.248Γ—100%=24.8%).

Note

The probability of drawing a black ball in our second selection is dependent on what we selected first, and in our calculation we have actually used the formula for dependent events: 𝑃(π΅βˆ©π‘…)=𝑃(π΅βˆ£π‘…)×𝑃(𝑅).

The probability 𝑃(π΅βˆ£π‘…)=1536 is the conditional probability of selecting a black ball given that a red ball has already been taken from the bag. 𝑃(𝑅)=2237 the probability that the first ball selected is red. Using the formula, we therefore have 𝑃(π‘…βˆ©π΅)=𝑃(π΅βˆ£π‘…)×𝑃(𝑅)=1536Γ—2237β‰ˆ0.248.

Before looking at some other examples, let us remind ourselves of some of the rules of probability that we will need.

Some Probability Rules and Definitions

For any event 𝐴, if 𝑃(𝐴) is the probability of event 𝐴 occurring, we have the following:

Rule 1

0≀𝑃(𝐴)≀1

Rule 2

Total probability: the sum of the probabilities of all possible outcomes is equal to 1 (or 100%).

The complement of event 𝐴, written as 𝐴, refers to everything that is not 𝐴.

Rule 3

𝑃𝐴=1βˆ’π‘ƒ(𝐴)

Note: The complement of event 𝐴 is sometimes also written as 𝐴.

Two events, 𝐴 and 𝐡, are

  • independent if the fact that 𝐴 occurs does not affect the probability of 𝐡 occurring,
  • dependent if the fact that 𝐴 occurs does affect the probability of 𝐡 occurring.

Rule 4

For independent events, 𝑃(𝐴∩𝐡)=𝑃(𝐴)×𝑃(𝐡).

Rule 5

If two events are not independent, however, 𝑃(𝐴∩𝐡)=𝑃(𝐴∣𝐡)×𝑃(𝐡), where 𝑃(𝐴∣𝐡) is the conditional probability for event 𝐴, given that event 𝐡 has occurred. If the events 𝐴 and 𝐡 are independent, 𝑃(𝐴∣𝐡)=𝑃(𝐴) and 𝑃(𝐡∣𝐴)=𝑃(𝐡).

In our next example, we will look at conditional probability applied to the weather, using a tree diagram.

Example 2: Conditional Probability Applied to the Weather Using a Tree Diagram

The probability that it rains on a given day is 0.6. If it rains, the probability that a group of friends play football is 0.2. If it does not rain, the probability that they play football rises to 0.8.

  1. Work out the probability that it rains on a given day and the friends play football.
  2. Work out the probability that it does not rain on a given day and the friends play football.
  3. What is the probability that the friends will play football on a given day?

Answer

Since we have a small number of outcomes, Rain/No Rain and Football/No Football, we can easily represent the whole set of outcomes on a tree diagram. The outcomes related to football are dependent on whether or not it rains, so our first set of branches should cover whether or not it rains. We know that the probability of rain is 0.6, so the probability that it does not rain, 𝑃Rain, is 1βˆ’π‘ƒ()=1βˆ’0.6=0.4Rain, and we can attach these probabilities to the relevant branches.

The second sets of branches covering football-related outcomes will lead off from these two branches and, as we did for Rain/No Rain, we can work out the probabilities for Football/No Football from the information we have.

We know if it rains the probability the friends play football is 0.2, so the probability of not playing football if it rains is 1βˆ’0.2=0.8. Similarly, if it does not rain, the probability that they play football is 0.8, so the probability that they do not play football if it does not rain is 1βˆ’0.8=0.2. With this information, we can fill in the new branches and probabilities on our tree diagram.

Now that we have our tree diagram, we can calculate the required probabilities.

Part 1

To work out the probability that it rains on a given day and the friends play football, we multiply the probabilities on the branches along the top of the diagram, corresponding to Rain and Football, highlighted below.