Tree Diagrams — An easy way to Understand Probability
Probability is the chance that a certain event will happen or the likelihood of some event will happen. Knowing probability and its applications is important because statistical inference uses probability distributions of the data. Having a good knowledge of probability is a must for an aspiring data scientist and data analyst. Reading this writing enables you to answer questions like:
- The probability of having a head when flipping a coin once? — 50% of course.
- What is the probability of having exactly 2 heads and 3 tails when flipping a coin three times?
- What is the probability of throwing tails first, then heads, then tails, then heads, then tails when flipping a coin 5 times?
- What is the probability that both numbers are less than five or odds if two dice are thrown together?
- Or simply what are the chances of no delays on a round trip if the chance of a flight being delayed is 0.2 (20%)…etc.
Answer 1 & 2: A coin has two faces: one head and a tail. That is counted as 2 equally likely outcomes (head, tail) for one independent event — flipping a coin one time. So, the probability of getting a head when flipping a coin once is 50%. With flipping the coin three times, we have 3 independent events here. The total outcomes must be 2³ = 8 outcomes. The outcomes of a sample space are called equally likely if all of them have the same chance of occurring. The probability of getting a head is equal to the probability of getting a tail in the first toss and is ½. The second time you toss the coin, the probability of getting a head is the same as the first time you toss the coin and is ½. Probability of getting a head is also ½ the third time you toss. Let’s look at the tree diagram below that shows all the possible outcomes of flipping a coin three times.
How do we calculate the overall probabilities?
- First, we multiply probabilities each time we toss across the rows
- Second, we add probabilities across the columns
Now let’s see:
- All the probability add up to 1
- The probability of getting 3 Heads “HHH” is ½ x ½ x ½ = ⅛
- The probability of getting 3 Tails “TTT” is ½ x ½ x ½ = ⅛
- The probability of getting at least 1 Head “HHH, HHT,HTH,HTT, THH,THT,TTH” from 3 tosses is 1/8 + 1/8 + 1/8 + 1/8 + 1/8 + 1/8 + ⅛ = ⅞ and this is also equal the probability of getting at least 1 tail from 3 tosses which is ⅞.
- The probability of getting exactly 2 heads and 3 tails when a coin is flipped 3 times is = probability of getting exactly 2 Heads “HHT,HTH,THH” + probability of getting 3 tails “TTT” = (1/8 + 1/8 + 1/8) + ⅛ = 1/2
A 3: So, what is the probability of throwing tail first, then head, then tail, then head, then tail when flipping a coin 5 times? We don’t have to work hard to figure this out. From the tree diagrams, this is what we get: P(THTHT) = ½ x ½ x ½ x ½ x ½ = 1/32
A4 -a: There are six possible equally likely outcomes on a dice: {1,2,3,4,5,6}.
There are four numbers less than five: {1,2,3,4} and two numbers are greater than or equal to 5: {5,6}.
The probability of getting a number less than five is 4/6 = ⅔, and the probability of getting a number greater or equal five is 2/6 = ⅓.
From the tree diagrams, you can see that the probability that both numbers are less than five is: ⅔ x ⅔ = 4/9. The probability of getting one number less than five and the other greater than or equal five is: 2/3 x 1/3 + 2/3 x 1/3 = 4/9, and the probability of getting two numbers greater or equal five is 1/3 x 1/3 = 1/9.
A4-b: Possible outcomes = {1,2,3,4,5,6} when tossing a dice in the air
Odd numbers ={1,3,5}, even numbers = {2,4,6}
The probability of getting an odd number or even number is 3/6 = ½ . The probability of getting both numbers are odd numbers is ½ x ½ = ¼. Let’s double check on the tree diagrams.
A5: The answer to question five is very much familiar to the way we respond to question 4. There are two independent possible outcomes: delay and no-delay. If the probability of being delayed is 0.2, the probability of not being delayed is 1–0.2 = 0.8. Let’s dive in.
The probability of having no delays on round trips is 0.8 x 0.8 = 0.64 ~ 64%.
The probability of return flight delayed is : 0.8 x 0.2 = 0.16
The chance of first flight delayed is: 0.2 x 0.8 = 0.16
And the probability of both flights delayed is: 0.2 x 0.2 = 0.04
To sum up when in doubt, you should draw a tree diagram, multiply along the rows and add the columns. Be sure to remember that all probabilities add to 1.
Happy Learning!