MathBored

Essential Math Primer
← Back to Primer Overview
R62 • Lesson 92 of 105

Conditional Probability

Probability of events given that another event has occurred

Reserve & Extensions • K-12

Prerequisites: H46

Key Concepts

  • conditional probability
  • dependent events
  • P(A|B)
  • probability rules

Conditional Probability

Sometimes the probability of an event changes when you learn new information. The chance of rain tomorrow might be 30% overall, but if you know a storm front is approaching, it might jump to 80%. Conditional probability formalizes this idea: what is the probability of event A, given that event B has already occurred?

The Formula

P(A | B) = P(A and B) / P(B)

Read P(A | B) as "the probability of A given B." The vertical bar means "given that."

SymbolMeaning
P(A | B)Probability of A occurring, given B has occurred
P(A and B)Probability that both A and B occur
P(B)Probability of B occurring

Worked Example 1: Basic Conditional Probability

A standard deck of 52 cards. You draw one card. Given that it is red, what is the probability it is a heart?

  1. Define events: A = heart, B = red card.
  2. P(A and B) = P(heart) = 13/52 (all hearts are red).
  3. P(B) = P(red) = 26/52.
  4. P(A | B) = (13/52) / (26/52) = 13/26 = 1/2.

Given that a card is red, there is a 50% chance it is a heart. This makes sense -- half of red cards are hearts.

Two-Way Tables

Two-way tables are an excellent tool for organizing data and computing conditional probabilities.

Worked Example 2: Using a Two-Way Table

A survey of 200 students asked about pet preferences:

Prefers DogsPrefers CatsTotal
Boys603090
Girls5060110
Total11090200

Find: P(prefers dogs | girl)

  1. We are given the student is a girl, so the sample space shrinks to the 110 girls.
  2. Of those 110 girls, 50 prefer dogs.
  3. P(dogs | girl) = 50/110 = 5/11 ≈ 0.4545 or about 45.5%.

Independent vs. Dependent Events

Two events are independent if knowing one occurred does not change the probability of the other:

A and B are independent if P(A | B) = P(A)

If P(A | B) differs from P(A), the events are dependent.

Worked Example 3: Testing Independence

Using the pet survey above, is pet preference independent of gender?

  1. P(dogs) = 110/200 = 0.55 (overall)
  2. P(dogs | girl) = 50/110 ≈ 0.4545
  3. P(dogs | boy) = 60/90 ≈ 0.6667
  4. Since 0.4545 and 0.6667 both differ from 0.55, pet preference is dependent on gender in this data.

Tree Diagrams

A tree diagram visually maps out sequences of events and their probabilities. Each branch represents a possible outcome, and you multiply along branches to find the probability of a path.

Worked Example 4: Tree Diagram

A bag has 3 red and 2 blue marbles. You draw two without replacement. Find P(2nd is red | 1st was blue).

  1. After drawing a blue marble first, 4 marbles remain: 3 red and 1 blue.
  2. P(2nd red | 1st blue) = 3/4.

For the full tree: P(1st blue) = 2/5. Then P(2nd red | 1st blue) = 3/4. So P(blue then red) = (2/5)(3/4) = 6/20 = 3/10.

Common Mistake: Confusing P(A | B) with P(B | A)

P(A | B) and P(B | A) are generally NOT the same. P(rain | cloudy) is not the same as P(cloudy | rain). Most cloudy days do not produce rain, but most rainy days are cloudy. Always check which event is the "given."

Shrinking the Sample Space

A useful way to think about conditional probability: the "given" condition reduces your sample space. Instead of looking at all outcomes, you only look at those where B happened, then ask how many of those also have A.

Practice Problems

1. A die is rolled. Given that the result is even, what is the probability it is a 6?

Show Solution

Even outcomes: {2, 4, 6}. Of these, one is a 6. P(6 | even) = 1/3.

2. In a class of 30 students, 18 play sports and 12 do not. Of those who play sports, 10 have a GPA above 3.5. Of those who do not play sports, 8 have a GPA above 3.5. Find P(GPA > 3.5 | plays sports).

Show Solution

Of the 18 who play sports, 10 have GPA > 3.5. P = 10/18 = 5/9 ≈ 0.556.

3. P(A and B) = 0.12, P(B) = 0.40. Find P(A | B).

Show Solution

P(A | B) = 0.12 / 0.40 = 0.30 or 30%.

4. Are these events independent? P(A) = 0.5, P(B) = 0.3, P(A and B) = 0.15.

Show Solution

If independent, P(A and B) should equal P(A) × P(B) = 0.5 × 0.3 = 0.15. It does! The events are independent.

5. A box has 4 green and 6 yellow balls. Two are drawn without replacement. Find the probability both are green.

Show Solution

P(1st green) = 4/10. P(2nd green | 1st green) = 3/9 = 1/3. P(both green) = (4/10)(1/3) = 4/30 = 2/15.

Lesson Summary

Overview