Six Detailed Examples Using The Multiplication Rule
Recall that the multiplication rule is used to calculate the probability that multiple events occur.
If the events are independent, the formula is:
P(A and B) = P(A) * P(B)
If the events are dependent, the formula is:
P(A and B) = P(A) * P(B|A)
A detailed explanation of the addition rule is part of the DISCOVERY course content:
Example 1: Farmers Market (Simple)
Reed loves going to the farmers market. Each week, he has an 18% chance of buying flowers, a 23% chance of buying apples, a 42% chance of buying a loaf of bread, and a 17% chance of buying tomatoes. Each decision is independent of his other decisions.
What is the probability that Reed buys flowers and a loaf of bread?
Solution
The question asks us to find the probability of both events occurring, so we know we need to use the multiplication rule. Additionally, since we have been told these events are independent, we can use the formula: P(A and B) = P(A) * P(B)
where:
P(A)
is the probability that Reed buys flowers, which is given to us as 18% or0.18
.P(B)
is the probability that Reed buys a loaf of bread, which is given to us as 42% or0.42
.
Therefore:
P(flowers and bread)
=P(A) * P(B)
=0.18 * 0.42
=0.0756
- The probability that Reed buys flowers and a loaf of bread is 7.56% (
0.0756
).
Example 2: Trains
Thomas takes the train to work every day. He has to take the red line to the blue line, but the blue line has a 68% chance of being late if the red line is late. The red line has a 22% chance of being late if Thomas leaves for work before 8:00 AM, but it has a 45% chance of being late if Thomas leaves later.
What is the probability that both the red and blue lines are late if Thomas leaves for work at 8:15 AM?
Solution
The question asks us to find the probability of both events occurring, so we know we need to use the multiplication rule. However, since the blue line being late is depending on if the red line is late, we know the events are not independent. Therefore, we need to use the formula: P(A and B) = P(A) * P(B|A)
where:
P(A)
is the probability that the red train is late when Thomas leaves for work at 8:15 AM. This is given in the problem as 45% or0.45
.P(B)
is the probability that the blue train is late.P(B | A)
is the probability that the blue train is late givenA
(which was the probability that the red train is late). This was given in the problem as 68% or0.68
.
Therefore:
P(A and B)
=P(A) * P(B|A)
=0.45 * 0.68
=0.306
- The probability that both the red and the blue trains are late when Thomas leaves at 8:15 AM is 30.6% (
0.306
).
Example 3: Betting Game
Jimmy and Jack are playing a betting game. If Jack rolls at least one 4 on three rolls of an eight-sided die, Jimmy will give him $5. What is the probability that Jack wins the bet?
Solution
The question asks us to find the probability of rolling at least one 4 out of three total rolls of an eight-sided die, so we know we need to use the multiplication rule. However, trying to find at least one 4 is complicated, so it would be easier for us to find the complement and subtract from 1, which is the total probability. The complement of at least one 4 is rolling no 4s. When we do 1 - probability of no 4s
, we subtract all of the occurrences without any 4s, and leave the total probability of all events where either one, two, or three 4s are rolled, giving us the probability that at least one 4 is rolled. We know that rolling a die is independent. Therefore, we need to use the formula: P(A and B and C) = P(A) * P(B) * P(C)
where:
P(A)
is the probability of not rolling a 4 on the first roll. Since Jack is using an 8-sided die, we know the probability of not rolling a 4 is 7⁄8.P(B)
is the probability of not rolling a 4 on the second roll. Since rolling a die is independent, the probability of not rolling a 4 on the second roll would be the same as not rolling a 4 on the first roll, 7⁄8.P(C)
is the probability of not rolling a 4 on the third roll. Since rolling a die is independent, the probability of not rolling a 4 on the third roll would be the same as not rolling a 4 on the first and second roll, 7⁄8.P((A and B and C)')
denotes the probability of the complement of A and B and C, where P(A and B and C) is the probability of rolling no 4s. Therefore, P((A and B and C)') is the probability of rolling at least one 4.
Therefore:
P(A and B and C)
=P(A)
*P(B)
*P(C)
= 7⁄8 * 7⁄8 * 7⁄8 = (7⁄8)3 = 0.6699- Remember
P(at least one 4)
= 1 -P(no 4s)
, so: P((A and B and C)')
= 1 -P(A and B and C)
= 1 -0.6699
=0.3301
- The probability that Jack rolls at least one 4 on 3 rolls of an 8-sided die and wins $5 is 33.01% (
0.3301
).
Example 4: Concert
Mary and Rose are seeing their favorite band in concert tonight, and they really want to meet them. After each show, the band has a 15% chance of coming out to meet fans. If they come out, there is a 60% chance they will give out signed posters and a 45% chance they will take a picture with fans. If they do not come out, there is a 35% chance security will give out signed posters and a 22% chance that they will hand out official set lists. What is the probability that the band comes out and Mary and Rose get a signed poster?
Solution
The question asks us to find the probability of both events occurring, so we know we need to use the multiplication rule. However, since receiving a signed poster is dependent on if the band comes out, we know the events are dependent. Therefore, we need to use the formula P(A and B) = P(A) * P(B|A)
where:
P(A)
is the probability that the band comes out to meet fans. This is given in the problem as 15% or0.15
P(B)
is the probability that Mary and Rose receive a signed poster.P(B|A)
is the probability that Mary and Rose receive a signed poster givenA
(which was the probability that the band comes out to meet fans). This is given to us in the problem as 60% or0.6
.
Therefore:
P(A and B)
=P(A) * P(B|A)
=0.15
*0.60
=0.09
- The probability that the band comes out to meet fans and Mary and Rose get a signed poster is 9% (
0.09
).
Example 5: Travel (with Python)
Caroline and Victor are feeling adventurous, and want to travel twice this year. However, they are feeling indecisive, and put all of the places they are considering on slips of paper in a hat.
Below is a DataFrame representing all of the places they are considering:
# Creating a DataFrame named 'destinations' with 'city', 'country',and 'continent' columns.
destinations = pd.DataFrame([
{'city': 'Bali', 'country': 'Indonesia', 'continent': 'Asia'},
{'city': 'New Orleans', 'country': 'USA', 'continent': 'North America'},
{'city': 'Dublin', 'country': 'Ireland', 'continent': 'Europe'},
{'city': 'Sydney', 'country': 'Australia', 'continent': 'Australia'},
{'city': 'Paris', 'country': 'France', 'continent': 'Europe'},
{'city': 'Cape Town', 'country': 'South Africa', 'continent': 'Africa'},
{'city': 'New York City', 'country': 'USA', 'continent': 'North America'},
{'city': 'Rome', 'country': 'Italy', 'continent': 'Europe'},
{'city': 'London', 'country': 'England', 'continent': 'Europe'},
{'city': 'Tokyo', 'country': 'Japan', 'continent': 'Asia'},
{'city': 'Barcelona', 'country': 'Spain', 'continent': 'Europe'},
{'city': 'Rio de Janeiro', 'country': 'Brazil', 'continent': 'South America'},
{'city': 'Agra', 'country': 'India', 'continent': 'Asia'},
{'city': 'Cairo', 'country': 'Egypt', 'continent': 'Africa'},
{'city': 'Berlin', 'country': 'Germany', 'continent': 'Europe'},
{'city': 'Toronto', 'country': 'Canada', 'continent': 'North America'},
{'city': 'Seoul', 'country': 'South Korea', 'continent': 'Asia'},
{'city': 'Lima', 'country': 'Peru', 'continent': 'South America'},
{'city': 'Copenhagen', 'country': 'Denmark', 'continent': 'Europe'},
{'city': 'Beijing', 'country': 'China', 'continent': 'Asia'},
{'city': 'Chicago', 'country': 'Illinois', 'continent': 'North America'}
])
destinations
city | country | continent | |
---|---|---|---|
0 | Bali | Indonesia | Asia |
1 | New Orleans | USA | North America |
2 | Dublin | Ireland | Europe |
3 | Sydney | Australia | Australia |
4 | Paris | France | Europe |
5 | Cape Town | South Africa | Africa |
6 | New York City | USA | North America |
7 | Rome | Italy | Europe |
8 | London | England | Europe |
9 | Tokyo | Japan | Asia |
10 | Barcelona | Spain | Europe |
11 | Rio de Janeiro | Brazil | South America |
12 | Agra | India | Asia |
13 | Cairo | Egypt | Africa |
14 | Berlin | Germany | Europe |
15 | Toronto | Canada | North America |
16 | Seoul | South Korea | Asia |
17 | Lima | Peru | South America |
18 | Copenhagen | Denmark | Europe |
19 | Beijing | China | Asia |
20 | Chicago | Illinois | North America |
Caroline randomly selects 2 slips of paper with destinations from the hat without replacement. What is the probability that both destinations are in Europe?
Solution:
Hand Calculations
The question asks us to find the probability of both events occurring, so we know we need to use the multiplication rule. However, since Caroline is selecting from the hat without replacement, we know the events are dependent. Therefore, we need to use the formula P(A and B) = P(A) * P(B|A)
where:
P(A)
is the probability Caroline chooses a destination in Europe on her first selection. This is the total amount of destinations in Europe (7) divided by the total amount of destinations (21), 7⁄21 or approximately 33.33% or approximately0.3333
.P(B)
is the probability Caroline chooses a destination in Europe on her second selection.P(B|A)
is the probability Caroline chooses a destination in Europe on her second selection given she chose Europe on her first selection. This is the total amount of destinations in Europe divided by the total amount of destinations after choosing 1 Europe slip, 6⁄20 or 30% or0.3
.
Therefore:
P(A and B)
=P(A) * P(B|A)
= 7⁄21 * 6⁄20 =0.1
or 10%- The probability that Caroline chooses 2 slips of paper with destinations in Europe from a hat without replacement is 10% (
0.1
).
Python Calculations
Example 6: Group Project
For the next week, Antonia's english class will be working on a group project. Antonia will be put in a randomly chosen group with 4 other students in the class.
Below is a DataFrame representing all of the students in Antonia's class:
# Creating a DataFrame named 'students' with 'name' and 'grade' columns.
students = pd.DataFrame([
{'name': 'Tim', 'grade': 'sophomore'},
{'name': 'Annie', 'grade': 'senior'},
{'name': 'Amy', 'grade': 'freshman'},
{'name': 'Anthony', 'grade': 'freshman'},
{'name': 'Sam', 'grade': 'sophomore'},
{'name': 'Maya', 'grade': 'junior'},
{'name': 'Stella', 'grade': 'junior'},
{'name': 'Katy', 'grade': 'sophomore'},
{'name': 'Michael', 'grade': 'freshman'},
{'name': 'Adriana', 'grade': 'junior'},
{'name': 'Riley', 'grade': 'junior'},
{'name': 'Kyle', 'grade': 'junior'},
{'name': 'Jason', 'grade': 'sophomore'},
{'name': 'Josh', 'grade': 'senior'},
{'name': 'Stacy', 'grade': 'senior'},
{'name': 'Jessica', 'grade': 'freshman'},
{'name': 'Natalie', 'grade': 'junior'},
{'name': 'Sophie', 'grade': 'sophomore'},
{'name': 'Matt', 'grade': 'junior'},
{'name': 'Claire', 'grade': 'sophomore'}
])
students
name | grade | |
---|---|---|
0 | Tim | sophomore |
1 | Annie | senior |
2 | Amy | freshman |
3 | Anthony | freshman |
4 | Sam | sophomore |
5 | Maya | junior |
6 | Stella | junior |
7 | Katy | sophomore |
8 | Michael | freshman |
9 | Adriana | junior |
10 | Riley | junior |
11 | Kyle | junior |
12 | Jason | sophomore |
13 | Josh | senior |
14 | Stacy | senior |
15 | Jessica | freshman |
16 | Natalie | junior |
17 | Sophie | sophomore |
18 | Matt | junior |
19 | Claire | sophomore |
Since Antonia is a sophomore, she hopes that she will be put in a group with other sophomores to meet more people in her year. What is the probability that at least 1 student in her group is a sophomore?
Solution:
Hand Calculations
The question asks us to find the probability of at least one event occurring out of three selections, so we know we need to use the multiplication rule. However, since we want to find the probability of at least one sophomore, we know that we should use the complement to make the problem easier for us. The complement of choosing at least one sophomore is choosing no sophomores. When we do 1 - probability of no sophomores
, we get the total probability of all other events that include either 1, 2, or 3 sophomores, also known as at least one sophomore. Since group members are chosen without replacement, we know that these events are dependent. Therefore, we need to use the formula P(A and B and C) = P(A) * P(B|A) * P(C|A and B)
where:
P(A)
is the probability that the first person chosen is not a sophomore. This is the total amount of non-sophomores, 14, and divided by the total number of students, 20. Therefore, it is 14⁄20 or 70% or0.7
.P(B)
is the probability that the second person chosen is not a sophomore.P(B|A)
is the probability that the second person chosen is not a sophomore given the first person chosen is not a sophomore. This is the total amount of non-sophomores left to choose from after one non-sophomore is chosen, 14 - 1 = 13, divided by the total number of students left to choose from, 20 - 1 = 19. Therefore, it is 13⁄19 or approximately 68.42% or0.6842
.P(C)
is the probability that the third person chosen is not a sophomore.P(C|A and B)
is the probability that the third person chosen is not a sophomore given the first and second people chosen are not sophomores. This is the total amount of non-sophomores left to choose from after 2 non-sophomores are chosen, 14 - 2 = 12, divided by the total number of students left to choose from after 2 people are chosen, 20 - 2 = 18. Therefore, it is 12⁄18 or 66.67% or0.6667
.P((A and B and C)')
denotes the probability of the complement of A and B and C where P(A and B and C) is the probability of no sophomores being chosen for Antonia's group. Therefore, P((A and B and C)') is the probability that at least one sophomore is chosen for Antonia's group.
Therefore:
P(A and B and C)
=P(A) * P(B|A) * P(C|A and B)
= 14⁄20 * 13⁄19 * 12⁄18 ≅0.3193
P((A and B and C)')
= 1 -P(A and B and C)
= 1 -0.3193
=0.6807
- The probability that at least one sophomore is chosen for Antonia's group is 68.07% (
0.6807
).