Skip to content
Family Table Math
Auto

Conditional Probability

Knowing that something has happened can change the probability of something else. If you know a card is a face card, the chance it’s a king jumps from 113\tfrac{1}{13} to 13\tfrac{1}{3}. This updated probability is a conditional probability, and it’s behind everything from medical tests to weather forecasts.

P(B∣A)P(B \mid A) is read “the probability of BB given AA”: the probability of BB, knowing that AA has happened.

P(B∣A)=P(A and B)P(A)P(B \mid A) = \frac{P(A \text{ and } B)}{P(A)}

Knowing AA happened shrinks the sample space to just the outcomes in AA. You then ask what fraction of those are also in BB.

Rearranging gives the multiplication rule from dependent events: P(A and B)=P(A)×P(B∣A)P(A \text{ and } B) = P(A) \times P(B \mid A).

A two-way table (contingency table) sorts data by two categories. For P(B∣A)P(B \mid A), look only at the row or column for AA, and find the fraction that is also BB.

P(B∣A)P(B \mid A) and P(A∣B)P(A \mid B) are usually different. The probability that a student drives, given that they’re in Grade 12, is not the same as the probability that a student is in Grade 12, given that they drive.

AA and BB are independent exactly when knowing AA doesn’t change the probability of BB:

P(B∣A)=P(B)P(B \mid A) = P(B)

Desmos can’t set this up for you. On the SAT, conditional probability almost always comes from a two-way table, and the words “given that” or “of those who” tell you to restrict to one row or column: that row or column total becomes the denominator. Check the order too, since the probability of A given B is usually not the same as the probability of B given A. A fill-in answer can be entered as a fraction. See using Desmos on the SAT.

A die is rolled. Given that the result is even, find the probability that it’s a 66.

Solution. Knowing it’s even, the sample space is {2,4,6}\{2, 4, 6\}. One of the three is a 66:

P(6∣even)=13P(6 \mid \text{even}) = \frac{1}{3}

A survey of 200200 students:

DrivesDoesn’t driveTotal
Grade 1130307070100100
Grade 1260604040100100
Total9090110110200200

Find P(drives∣Grade 12)P(\text{drives} \mid \text{Grade 12}) and P(Grade 12∣drives)P(\text{Grade 12} \mid \text{drives}).

Solution. Given Grade 12, look only at that row: 6060 of the 100100 drive.

P(drives∣Grade 12)=60100=0.6P(\text{drives} \mid \text{Grade 12}) = \frac{60}{100} = 0.6

Given that a student drives, look only at that column: 6060 of the 9090 drivers are in Grade 12.

P(Grade 12∣drives)=6090=23P(\text{Grade 12} \mid \text{drives}) = \frac{60}{90} = \frac{2}{3}

P(A)=0.4P(A) = 0.4 and P(A and B)=0.1P(A \text{ and } B) = 0.1. Find P(B∣A)P(B \mid A).

Solution.

P(B∣A)=0.10.4=0.25P(B \mid A) = \frac{0.1}{0.4} = 0.25

A condition affects 2%2\% of people. A test correctly gives a positive result for 95%95\% of people with the condition, but it also gives a (false) positive for 5%5\% of people without it. If someone tests positive, what’s the probability they have the condition?

Solution. Use a tree: first branch on the condition, then on the test.

  • Has the condition and tests positive: 0.02×0.95=0.0190.02 \times 0.95 = 0.019
  • Doesn’t have it and tests positive: 0.98×0.05=0.0490.98 \times 0.05 = 0.049

So P(positive)=0.019+0.049=0.068P(\text{positive}) = 0.019 + 0.049 = 0.068, and:

P(condition∣positive)=0.0190.068≈0.279P(\text{condition} \mid \text{positive}) = \frac{0.019}{0.068} \approx 0.279

Only about 28%28\%! Because the condition is rare, most positive results come from the much larger group of healthy people. This is why doctors confirm positive results with a second test.

Swapping the order. P(drives∣Grade 12)P(\text{drives} \mid \text{Grade 12}) divides by the Grade 12 total; P(Grade 12∣drives)P(\text{Grade 12} \mid \text{drives}) divides by the drivers total. Ask: “what do I already know?” That’s the group you divide by.

Dividing by the overall total. In a two-way table, a conditional probability uses a row or column total, not the grand total.

Confusing P(A and B)P(A \text{ and } B) with P(B∣A)P(B \mid A). “And” is out of everyone; “given” is out of only the group where AA happened.

Trusting intuition with rare events. As Example 4 shows, a positive result for a rare condition can still be more likely a false alarm. Work it out.

1. (Warm-up) A card is drawn from a standard deck. Given that it’s a face card, what’s the probability it’s a king?

Solution

There are 1212 face cards, 44 of them kings: 412=13\tfrac{4}{12} = \tfrac{1}{3}.

2. (Warm-up) P(A and B)=0.12P(A \text{ and } B) = 0.12 and P(A)=0.3P(A) = 0.3. Find P(B∣A)P(B \mid A).

Solution

0.120.3=0.4\tfrac{0.12}{0.3} = 0.4

3. (Warm-up) Two coins are flipped. Given that at least one is heads, find the probability that both are heads.

Solution

Knowing at least one is heads leaves HH, HT, TH. One of these three is HH: 13\tfrac{1}{3}.

4. (Core) A survey of 120120 households:

Has a petNo petTotal
Children at home363614145050
No children282842427070
Total64645656120120

Find P(pet∣children)P(\text{pet} \mid \text{children}), P(children∣pet)P(\text{children} \mid \text{pet}), and P(pet)P(\text{pet}).

Solution

P(pet∣children)=3650=0.72P(\text{pet} \mid \text{children}) = \tfrac{36}{50} = 0.72.

P(children∣pet)=3664=0.5625P(\text{children} \mid \text{pet}) = \tfrac{36}{64} = 0.5625.

P(pet)=64120≈0.533P(\text{pet}) = \tfrac{64}{120} \approx 0.533.

5. (Core) Two dice are rolled. Find P(sum is 8∣first die is 3)P(\text{sum is } 8 \mid \text{first die is } 3) and P(first die is 3∣sum is 8)P(\text{first die is } 3 \mid \text{sum is } 8).

Solution

Given the first die is 33, the sum is 88 only if the second is 55: 16\tfrac{1}{6}.

Given the sum is 88, the pairs are (2,6),(3,5),(4,4),(5,3),(6,2)(2,6), (3,5), (4,4), (5,3), (6,2), and one starts with 33: 15\tfrac{1}{5}.

6. (Core) Using the table in Question 4, is having a pet independent of having children at home? Explain.

Solution

No. P(pet∣children)=0.72P(\text{pet} \mid \text{children}) = 0.72, but P(pet)≈0.533P(\text{pet}) \approx 0.533. Knowing there are children changes the probability of having a pet, so the events are dependent.

7. (Core) A bag has 33 red and 22 blue marbles. Two are drawn without replacement. Find P(2nd red∣1st red)P(\text{2nd red} \mid \text{1st red}) and P(1st red∣2nd red)P(\text{1st red} \mid \text{2nd red}).

Solution

After a red is removed, 22 of 44 are red: P(2nd red∣1st red)=24=12P(\text{2nd red} \mid \text{1st red}) = \tfrac{2}{4} = \tfrac{1}{2}.

P(2nd red)=35⋅24+25⋅34=35P(\text{2nd red}) = \tfrac{3}{5} \cdot \tfrac{2}{4} + \tfrac{2}{5} \cdot \tfrac{3}{4} = \tfrac{3}{5}, and P(both red)=310P(\text{both red}) = \tfrac{3}{10}, so:

P(1st red∣2nd red)=3/103/5=12P(\text{1st red} \mid \text{2nd red}) = \frac{3/10}{3/5} = \frac{1}{2}

8. (Challenge) A condition affects 1%1\% of people. A test detects it 90%90\% of the time, and gives false positives 8%8\% of the time. If someone tests positive, find the probability they have the condition.

SolutionP(positive)=0.01(0.90)+0.99(0.08)=0.009+0.0792=0.0882P(\text{positive}) = 0.01(0.90) + 0.99(0.08) = 0.009 + 0.0792 = 0.0882P(condition∣positive)=0.0090.0882≈0.102P(\text{condition} \mid \text{positive}) = \frac{0.009}{0.0882} \approx 0.102

Only about 10%10\%.

9. (Challenge) Show that if AA and BB are independent, then P(B∣A)=P(B)P(B \mid A) = P(B).

Solution

For independent events, P(A and B)=P(A)P(B)P(A \text{ and } B) = P(A)P(B). So:

P(B∣A)=P(A and B)P(A)=P(A)P(B)P(A)=P(B)P(B \mid A) = \frac{P(A \text{ and } B)}{P(A)} = \frac{P(A)P(B)}{P(A)} = P(B)