Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

L2-04 · Calculate conditional probability

A conditional probability counts inside one group. The group you condition on becomes the whole, so its total goes on the bottom of the fraction. If knowing one thing does not change the chance of the other, the two events are independent.

Level 2 icon Level 2 · Grades 7–9 · about 45 minutes
Big idea. A conditional probability counts inside one group. The group you condition on becomes the whole, so its total goes on the bottom of the fraction. If knowing one thing does not change the chance of the other, the two events are independent.
Before this lesson. L1-04, L1-02
Grown-ups. The guide for adults is at the end of this page.

What you will learn

Story: Do musicians like math more?

Maya’s school club ran an imagined survey of 200 students. These are made-up numbers, not a real school. Each student answered two questions. Do you play an instrument? Do you like math? Leo put the answers into a two-way table with a total for every row and column.

Of the 200 students, 60 play an instrument. Of those 60, 36 like math and 24 do not. Of the 140 who play no instrument, 64 like math and 76 do not. Leo checks the table: 60 + 140 = 200, and 100 students like math in all.

Maya asks a sharper question. “If I only look at the students who play an instrument, what fraction like math?” Now the 60 players are the whole group. So the answer is 36 out of 60, which is 0.6. In symbols, P(math | instrument) = 36 / 60 = 0.6. The bar means “given”.

Leo compares this with the whole survey. There, 100 out of 200 is 0.5, so P(math) = 0.5. Knowing that a student plays an instrument changes the chance from 0.5 to 0.6. So in this survey, liking math and playing an instrument are not independent.

“So playing music makes you like math?” Leo asks. Maya shakes her head. “The table only shows that the two go together here. It does not say which one causes the other, or whether something else causes both.” The rule they used is P(A | B) = P(A and B) / P(B), as long as P(B) is more than 0.

Conditioning on one row makes that row’s total the bottom of the fraction.

What the animation shows. A two-way table shows an imagined survey of 200 students with made-up numbers. The row for students who play an instrument lights up and the other rows fade. The 36 in that row moves up to the top of a fraction, and the row total 60 moves to the bottom. The screen reads 36 out of 60 is 0.6. Next, the whole survey counts again. The total of students who like math gives 100 out of 200 is 0.5. The two answers are different, so the events are not independent in this survey.

Hands-on: Doubles and big sums

About 20 minutes.

You need:

Steps:

  1. Draw a two-way table. The rows are “double” and “not a double”. The columns are “sum above 7” and “sum 7 or less”. Add a total row and a total column.

  2. Roll both dice. A double means both dice show the same number. Make a tally mark in the right cell.

  3. Roll at least 36 times. Then fill in all the totals and check that they add up to your number of rolls.

  4. Find P(double) from your counts: all doubles divided by all rolls.

  5. Find P(double | sum above 7): doubles with a sum above 7, divided by the total of the “sum above 7” column.

  6. Now find the exact answers. List all 36 equally likely pairs, from (1,1) to (6,6). Count the doubles and the pairs with a sum above 7.

  7. Compare the exact P(double) with the exact P(double | sum above 7). Are the two events independent? Then compare your counts with the exact answers.

Practice together

Use the 36 equally likely pairs from two dice. What is P(double)? What is P(double | sum above 7)? Are the two events independent?

Check your answer

There are 6 doubles, so P(double) = 6/36 = 1/6. There are 15 pairs with a sum above 7. Only 3 of them are doubles: (4,4), (5,5) and (6,6). So P(double | sum above 7) = 3/15 = 1/5. Since 1/5 is not 1/6, the events are not independent.

Try it yourself

1. In another imagined class of 40 students (made-up numbers), 20 have a pet. Of the 16 who walk to school, 8 have a pet. Find P(pet) and P(pet | walks). Are the two events independent in this class?

Check your answer

P(pet) = 20/40 = 0.5. P(pet | walks) = 8/16 = 0.5. They are equal, so in this class having a pet and walking to school are independent.

2. Roll two dice. Event A is “a double”. Event B is “an odd sum”. Can A and B happen together? Are they independent?

Check your answer

A double always has an even sum, so A and B can never happen together. They are mutually exclusive. They are not independent: P(A) = 1/6, but P(A | B) = 0. Knowing B happened tells you A did not.

Talk about it

Check yourself

1. In the imagined survey, what is P(math | instrument)?

Show the answer

C. 36 out of 60

The condition is “plays an instrument”, so only the 60 players count. Of them, 36 like math, which is 36 out of 60.

2. For two events with P(B) more than 0, which statement shows they are independent?

Show the answer

B. P(A | B) = P(A)

Independent means knowing B does not change the chance of A, so P(A | B) = P(A). Events that never happen together are mutually exclusive, which is different.

3. Remember Lesson 2. A rule predicts a height of 11 cm, and the measured height is 12 cm. What is the residual? (Review of L2-02)

Show the answer

C. 1 cm

A residual is observed minus predicted. That is 12 cm minus 11 cm, which is 1 cm.

Words to know

conditional probability
The chance of one event when we already know a second event happened. We write P(A | B) and say “the probability of A given B”.
independent
Two events are independent when knowing that one happened does not change the chance of the other. In symbols, P(A | B) = P(A).
mutually exclusive
Two events are mutually exclusive when they can never happen together, like rolling a 2 and rolling a 5 on one roll of a die.
For grown-ups: about this lesson

Why it matters. The lesson builds conditional probability from a two-way table, where the row or column total is visibly the denominator. Two-way tables and conditional probability are presented this way in OpenStax Barbara Illowsky and Susan Dean, 2023, and independence is defined there as P(A | B) = P(A), separate from mutual exclusivity Barbara Illowsky and Susan Dean, 2023. The standards ask students to read two-way tables (8.SP.4) and to understand conditional probability as P(A and B) / P(B) and independence as P(A | B) = P(A) (S-CP.3) NGA Center and CCSSO, 2010. The survey is made up and is labeled so on every surface. The dice task gives an exact check: 3 of the 15 pairs with a sum above 7 are doubles, so 1/5, not 1/6.

Watch for these mix-ups.

  • P(A | B) and P(B | A) are the same. (They have different denominators; in the survey, 36 of 60 players like math, but 36 of 100 math-likers play.)

  • Mutually exclusive means independent. (If two possible events cannot happen together, knowing one rules out the other, so they are dependent.)

  • A difference in a table shows a cause. (It shows an association in this group only; a common cause or chance could explain it.)

  • Rolled counts that give slightly different fractions disprove the exact answer. (Thirty-six rolls vary a lot; pooled rolls get closer to 1/6 and 1/5.)

To make it easier. Give the completed survey table and ask only for P(math) and P(math | instrument). Skip the dice table and use the list of 36 pairs.

To make it harder. Find P(instrument | math) from the same table and explain why it differs from P(math | instrument). Then change one cell so the events become independent while all totals still add up.

Limits. The survey numbers are invented for teaching. A real survey of 200 students estimates a pattern with sampling error, so two fractions that differ a little could still come from independent events in the wider population.

On the computer. Grown-ups can see where this idea leads later in Lab: Bayes’ rule, written for older learners.

Sources for this guide. Barbara Illowsky and Susan Dean, 2023Barbara Illowsky and Susan Dean, 2023NGA Center and CCSSO, 2010

Next: L2-05 · Reverse a condition with Bayes’ rule

References
  1. Barbara Illowsky and Susan Dean. (2023). 3.4 Contingency Tables. OpenStax, Introductory Statistics 2e. https://openstax.org/books/introductory-statistics-2e/pages/3-4-contingency-tables
  2. Barbara Illowsky and Susan Dean. (2023). 3.2 Independent and Mutually Exclusive Events. OpenStax, Introductory Statistics 2e. https://openstax.org/books/introductory-statistics-2e/pages/3-2-independent-and-mutually-exclusive-events
  3. NGA Center and CCSSO. (2010). Common Core State Standards for Mathematics. Common Core State Standards Initiative. https://learning.ccsso.org/wp-content/uploads/2022/11/Math_Standards1.pdf