Tree diagrams and conditional probability
When we have a situation where we are considering several events, it is beneficial to have a way of representing it visually. Tree diagrams are visual representations of the outcomes of events.
Example one
Robin has 2 bags. Bag A has 7 balls of which 3 are red and 4 are blue and bag B has 8 balls of which 5 are red and 3 are blue.
Robin is going to take a ball from each bag, he wants to know what all the possible outcomes are so he draws a tree diagram:
Notice how for bag A there are two possibilities, either a red ball or a blue ball can be selected and Robin has put the probability of each choice onto the diagram.
For bag B there are also two possibilities - these are written twice, once for each outcome of the first choice.
We can choose to take several different routes through the diagram depending on which outcomes we are interested in.
If we want to know the probability that both balls are red, we take the route that passes the \(\frac{3}{7}\) and the \(\frac{5}{8}\). We can use the AND rule to work out the probability of this happening:
P(R+R) = P(R) × P(R) = \(\frac{3}{7}\) × \(\frac{5}{8}\) = \(\frac{15}{56}\)
If we want red first, then blue, P(R+B) = \(\frac{3}{7} \times \frac{3}{8} = \frac{9}{56}\)
If we want blue first, then red, P(B+R) = \(\frac{4}{7} \times \frac{5}{8} = \frac{20}{56}\)
If we want blue first, then blue, P(B+B)= \(\frac{4}{7} \times \frac{3}{8} = \frac{12}{56}\)
What is the probability Robin selects 1 blue ball and 1 red ball?
Solution
There are two ways to select 1 blue and 1 red. P(R+B) or P(B+R) both satisfy the condition. We can use the OR rule to calculate the probability:
P(1 red and 1 blue) = \(\frac{9}{56} + \frac{20}{56} = \frac{29}{56}\)
Often we use tree diagrams to model conditional probability. This is where there is more than one outcome and they are not independent – in other words the first outcome affects the probability of the second.
Example two
Rachel is going to select a bead from a bag, then select a second bead from the same bag. She is not going to replace the bead in the bag after taking 1 out. In Rachel’s bag there are 4 red beads and 5 green beads.
Notice how the probabilities are different from the first and second choices. If a red bead is chosen first, then there is now 1 less red bead to choose, so the chance of selecting a blue bead is increased and the chance of selecting a second red bead decreases. If a green bead is selected, the chance of getting a green bead the second time decreases, and the chance of getting a red bead increases.
Question
What is the probability of selecting a red bead followed by a green bead?
We use the AND rule to work out the probability of getting a red, then a green bead.
P(red then green) = P(first red) \(\times\) P(second green) = \(\frac{4}{9} \times \frac{5}{8} = \frac{20}{72}\)
This can be simplified to \(\frac{5}{18}\)
Question
What is the probability of getting 1 red bead and 1 green bead (in any order)?
Getting 1 bead in each colour but in any order is the same thing as saying red then green or green then red. Our method for answering this question is therefore to add together the probability of getting each of those outcomes.
P(red and green) = P(red then green) + P(green then red)
P(red and green) = \(\frac{20}{72}\) + \(\frac{20}{72}\) = \(\frac{40}{72}\)
This can be simplified to \(\frac{5}{9}\)