A school surveys 200 grade-12 students about joining a sports club:
Joined
Not joined
Total
Boys
60
40
100
Girls
30
70
100
Total
90
110
200
One student is chosen at random. The probability that the student has joined the club is 20090=0.45. But if we also know that the student chosen is a girl, what is the probability that she has joined the club?
Conditional probability
Explore: shrinking the sample space
Once we know that the student is a girl, we only look at the 100 girls in the second row. Of these, 30 have joined, so the probability we want is
10030=0.3.
This is not 0.45: the information "is a girl" has changed the probability. We can also write it with probabilities over all 200 students:
10030=100/20030/200=P(girl)P(girl and joined)=0.50.15=0.3.
Why this formula? Knowing that B has happened means only the outcomes in B are still possible, so B acts as a new sample space. Inside it, the outcomes that make A happen are exactly A∩B. We divide by P(B) so that the probabilities in the "new space" add up to 1.
The definition gives P(A∣B)=1−P(A∣B), just as for ordinary probabilities.
The order of the two events in P(A∣B) matters a great deal, as the next example shows.
The multiplication rule and tree diagrams
Multiplying both sides of the definition by P(B) gives a formula for the probability of an intersection.
This rule is especially useful when an experiment happens in stages. On a tree diagram, each branch carries the conditional probability of that stage, and the probability of a path is the product of the numbers along it.
Tree diagram for drawing two balls without replacement
The four numbers at the ends add up to 5620+15+15+6=1, a quick check.
Independent events
In grade 11, two events were called independent when whether one happens does not change the probability of the other. With conditional probability we can write this as a formula: when P(B)>0,
A and B are independent⟺P(A∣B)=P(A)⟺P(A∩B)=P(A)⋅P(B).
The second equivalence follows from the multiplication rule. In the drawing example, P(D2∣D1)=74 but P(D2∣D1)=75, so D1 and D2 are not independent.
The last example is a medical one, where mixing up P(A∣B) and P(B∣A) can cause serious misunderstanding.
Key terms
Summary
P(A∣B)=P(B)P(A∩B) (with P(B)>0); for equally likely outcomes, n(B)n(A∩B).
Knowing that B happened shrinks the sample space to B; in a two-way table, read only the row or column of B.
P(A∣B) and P(B∣A) are usually different.
Multiplication rule: P(A∩B)=P(B)⋅P(A∣B); on a tree diagram, multiply along a path.
A, B independent ⟺P(A∣B)=P(A)⟺P(A∩B)=P(A)P(B).
Practice
Each exercise comes with what you need and some steps to start. Try it yourself first, then open the solution.
Exercise 1
A fair die is rolled. Given that the result is odd, find the probability that it is at most 3.
What you need and how to start
What you need:P(A∣B)=n(B)n(A∩B) when outcomes are equally likely.
Steps:
List B={1,3,5}.
Count the elements of B that are at most 3.
Show solution
A∩B={1,3}, so P(A∣B)=32.
Answer.32.
Exercise 2
A class has 40 students: 20 boys, 14 of whom like maths, and 20 girls, 10 of whom like maths. One student is chosen at random. Find the probability that the student likes maths given that she is a girl, and the probability that the student is a boy given that the student likes maths.
What you need and how to start
What you need: make a two-way table; read only the row (or column) of the condition.
Given P(A)=0.5, P(B)=0.4 and P(A∩B)=0.2, find P(A∣B) and P(B∣A), and decide whether A and B are independent.
What you need and how to start
What you need: the definition of conditional probability; independence means P(A∣B)=P(A).
Steps:
Divide P(A∩B) by P(B), then by P(A).
Compare P(A∣B) with P(A).
Show solution
P(A∣B)=0.40.2=0.5 and P(B∣A)=0.50.2=0.4. Since P(A∣B)=P(A), A and B are independent.
Answer.0.5; 0.4; independent.
Exercise 4
A box holds 4 white balls and 6 black balls. Two balls are drawn one after the other without replacement. Find the probability that both are black, and the probability that the second is white given that the first is black.
What you need and how to start
What you need: the multiplication rule P(A∩B)=P(A)⋅P(B∣A); after the first draw, 9 balls remain.
Steps:
P(black first)=106 and P(black second∣black first)=95.
A box holds 10 cards numbered 1 to 10. One card is drawn at random. Let A be "the number is even" and B be "the number is at least 7". Is each claim true or false?
a) P(B)=0.4.
b) P(A∣B)=21.
c) P(B∣A)=52.
d) A and B are not independent.
What you need and how to start
What you need:P(A∣B)=n(B)n(A∩B); independence means P(A∣B)=P(A).
Steps:
List B={7,8,9,10} and A∩B={8,10}.
Compare P(A∣B) with P(A)=21.
Show solution
a) True: P(B)=104=0.4.
b) True: P(A∣B)=42=21.
c) True: A has 5 elements, of which 8 and 10 are in B, so P(B∣A)=52.
d) False: P(A∣B)=21=P(A), so A and B are independent.
Answer. a) True; b) True; c) True; d) False.
Exercise 6
Two fair dice are rolled. Given that at least one die shows a 6, find the probability that the total is at least 10. Give your answer to 2 decimal places.
What you need and how to start
What you need: counting in the shrunken sample space.
Steps:
Count the outcomes with at least one 6: 36−25=11.
Among them, count those with total ≥10.
Show solution
The outcomes with a 6 and total ≥10 are (4,6), (6,4), (5,6), (6,5), (6,6). The probability is 115≈0.4545.
Answer.0.45.
Exercise 7
In a café, 70% of customers order a coffee drink, and 40% of those also order a cake. Also, 35% of all customers order a cake. Find the probability that a customer orders both coffee and cake, and the probability that a customer ordered coffee given that the customer ordered cake.
What you need and how to start
What you need: "40% of those" is the conditional probability P(cake∣coffee)=0.4.
Steps:
Use the multiplication rule.
Divide by P(cake)=0.35.
Show solution
P(coffee and cake)=0.7⋅0.4=0.28. P(coffee∣cake)=0.350.28=0.8.
Answer.0.28 and 0.8.
Exercise 8 Review
Two marksmen fire independently at a target, one shot each, hitting with probabilities 0.8 and 0.7. Given that the target is hit at least once, find the probability that both hit it. Give your answer to 2 decimal places.
What you need and how to start
What you need: the multiplication rule for independent events (grade 11) and the complementary event: P(at least one)=1−P(nobody hits).
Steps:
P(both hit)=0.8⋅0.7.
P(at least one hit)=1−0.2⋅0.3; "both hit" lies inside "at least one hit".
Show solution
P(both)=0.56 and P(at least one)=1−0.06=0.94. Since "both hit" implies "at least one hit", their intersection is "both hit", so the probability is 0.940.56=4728≈0.596.
Answer.≈0.60.
Exercise 9 Review
A group has 5 boys and 4 girls. Three of them are chosen at random. Given that at least one girl is chosen, find the probability that exactly one girl is chosen.
The number of choices with at least one girl is (39)−(35).
The number with exactly one girl is (14)⋅(25).
Show solution
(39)−(35)=84−10=74 and (14)⋅(25)=4⋅10=40. The probability is 7440=3720.
Answer.3720.
Exercise 10 Challenge
A fair coin is tossed three times. Let A be "the first toss is heads" and B be "at least two tosses are heads". Find P(A∣B) and P(B∣A), and decide whether A and B are independent.
What you need and how to start
What you need: list the 8 equally likely outcomes; independence means P(A∣B)=P(A).
Steps:
Write B (H for heads, T for tails): HHT, HTH, THH, HHH.
Count A∩B, then divide by n(B) and by n(A)=4.
Show solution
A∩B={HHT,HTH,HHH} has 3 elements. P(A∣B)=43 and P(B∣A)=43. Since P(A)=21=43, the events are not independent: knowing the first toss is heads makes at least two heads more likely.
Answer.43; 43; not independent.
Mini test
Mini test
Marked like the Vietnamese graduation exam: Part I 0.25 points per question; Part II up to 1 point per question (1, 2, 3, 4 correct statements give 0.1, 0.25, 0.5, 1 point); Part III 0.5 points per question.
Part I. Multiple choice
Question 1. Given P(A)=0.6, P(B)=0.5 and P(A∩B)=0.2, the value of P(A∣B) is
Answer: B.
P(A∣B)=0.50.2=0.4. A is P(A)P(B), C divides by P(A) (that is P(B∣A)), and D multiplies P(A∩B) by P(B).
Question 2. A fair die is rolled. Given that the result is even, the probability that it is a 6 is
Answer: C.
The shrunken sample space is {2,4,6}, so the probability is 31. A ignores the condition, B is the probability of an even number, and D multiplies 61⋅21.
Question 3. A box holds 3 red and 2 blue balls. Two balls are drawn one after the other without replacement. The probability that both are red is
Answer: B.
53⋅42=103. A treats the draws as with replacement, C is only the probability that the first is red, and D is only P(red second∣red first).
Question 4. Of 100 people asked, 40 use app X and 30 of those are satisfied; 60 do not use X and 30 of those are satisfied. A satisfied person is chosen at random. The probability that this person uses app X is
Answer: C.
There are 60 satisfied people, 30 of whom use X: 6030=21. A is P(satisfied∣uses X), B divides by all 100 people, and D is the probability of being satisfied.
Part II. True or false
Question 1.A and B are independent events with P(A)=0.4 and P(B)=0.5.
a)P(A∩B)=0.2.
b)P(A∣B)=0.4.
c)P(A∣B)=0.4.
d)P(A∪B)=0.7.
Answer: a) True; b) True; c) False; d) True.
a) True: 0.4⋅0.5. b) True: independence gives P(A∣B)=P(A). c) False: P(A∣B)=1−0.4=0.6. d) True: 0.4+0.5−0.2=0.7.
Part III. Short answer
Question 1. Two fair dice are rolled. Given that the total is 7, find the probability that one die shows a 1. Give your answer to 2 decimal places.
Answer: 0.33.
A total of 7 has 6 outcomes, of which (1,6) and (6,1) contain a 1: 62=31≈0.33.
Question 2. Of 500 people tested, 20 have a disease and 18 of them test positive; 480 do not have it and 24 of them test positive. A person who tests positive is chosen at random. Find the probability that this person has the disease. Give your answer to 2 decimal places.
Answer: 0.43.
There are 18+24=42 positive results, 18 of them from people with the disease: 4218=73≈0.43.
Show answers and explanations
Part I, question 1: B. P(A∣B)=0.50.2=0.4. A is P(A)P(B), C divides by P(A) (that is P(B∣A)), and D multiplies P(A∩B) by P(B).
Part I, question 2: C. The shrunken sample space is {2,4,6}, so the probability is 31. A ignores the condition, B is the probability of an even number, and D multiplies 61⋅21.
Part I, question 3: B. 53⋅42=103. A treats the draws as with replacement, C is only the probability that the first is red, and D is only P(red second∣red first).
Part I, question 4: C. There are 60 satisfied people, 30 of whom use X: 6030=21. A is P(satisfied∣uses X), B divides by all 100 people, and D is the probability of being satisfied.
Part II, question 1: a) True; b) True; c) False; d) True. a) True: 0.4⋅0.5. b) True: independence gives P(A∣B)=P(A). c) False: P(A∣B)=1−0.4=0.6. d) True: 0.4+0.5−0.2=0.7.
Part III, question 1: 0.33. A total of 7 has 6 outcomes, of which (1,6) and (6,1) contain a 1: 62=31≈0.33.
Part III, question 2: 0.43. There are 18+24=42 positive results, 18 of them from people with the disease: 4218=73≈0.43.