M4.6.7 Chapter 7

Conditional probability

In a class of 60, some pupils walk to school and some take the bus. If I pick a girl, what is the chance that she walks?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

  • Find a probability given that something has already happened
  • Use a two way table to find a conditional probability

Sometimes you already know something. You are told that a pupil is a girl, or that the first counter was red. This changes the chance of what comes next.

The chance of B when you know that A has already happened is called a conditional probability. We write it P(B given A).

A two way table is the best way to see it. Here are the 60 pupils, sorted by girl or boy and by walk or bus. The totals are worked out for you.

A table of 60 pupils. The rows are Girls and Boys, the columns are Walk and Bus, and there is a Total row and a Total column. Girls: 18 walk, 12 bus, total 30. Boys: 14 walk, 16 bus, total 30. Totals: 32 walk, 28 bus, 60 in all. Nothing is hatched.PupilsWalkBusTotalGirlsBoysTotal181230141630322860
The class of 60. 30 girls, 30 boys, 32 who walk and 28 who take the bus.

Draw it first

Find P(walks given girl) from the table

  1. A table of 60 pupils. The rows are Girls and Boys, the columns are Walk and Bus, and there is a Total row and a Total column. Girls: 18 walk, 12 bus, total 30. Boys: 14 walk, 16 bus, total 30. Totals: 32 walk, 28 bus, 60 in all. Step 1 shows the table. Step 2 hatches the Girls row, the 30 girls in all. Step 3 hatches the cell for girls who walk, 18 of them.PupilsWalkBusTotalGirlsBoysTotal181230141630322860

    1 Start with the table of all 60 pupils.

  2. A table of 60 pupils. The rows are Girls and Boys, the columns are Walk and Bus, and there is a Total row and a Total column. Girls: 18 walk, 12 bus, total 30. Boys: 14 walk, 16 bus, total 30. Totals: 32 walk, 28 bus, 60 in all. Step 1 shows the table. Step 2 hatches the Girls row, the 30 girls in all. Step 3 hatches the cell for girls who walk, 18 of them.PupilsWalkBusTotalGirlsBoysTotal181230141630322860

    2 You know the pupil is a girl, so look only at the Girls row. It holds 30 pupils.

  3. A table of 60 pupils. The rows are Girls and Boys, the columns are Walk and Bus, and there is a Total row and a Total column. Girls: 18 walk, 12 bus, total 30. Boys: 14 walk, 16 bus, total 30. Totals: 32 walk, 28 bus, 60 in all. Step 1 shows the table. Step 2 hatches the Girls row, the 30 girls in all. Step 3 hatches the cell for girls who walk, 18 of them.PupilsWalkBusTotalGirlsBoysTotal181230141630322860

    3 In that row, count the girls who walk: 18. The chance is 18 out of 30.

Worked example

A girl is chosen at random from the class of 60. What is the probability that she walks?

  1. We know she is a girl, so look at the Girls row only. It has 18 + 12 = 30 pupils.
  2. In that row, 18 pupils walk.
  3. P(walks given girl) = 18/30.
  4. 18/30 = 3/5.

Answer: 3/5

Notice what changed. The chance that a pupil in the whole class walks is 32/60, which is 8/15. For a girl it is 3/5. Knowing the pupil is a girl changed the chance.

Why does the table method work? The chance that a pupil is a girl and walks is P(A and B) = 18/60. The chance of a girl is P(A) = 30/60. Divide the first by the second and the 60 cancels.

This gives the rule P(B given A) = P(A and B) ÷ P(A). Here, 18/60 ÷ 30/60 = 18/30. Dividing by P(A) shrinks the world to the pupils in A.

Worked example

A pupil who walks is chosen at random. What is the probability that the pupil is a girl?

  1. We know the pupil walks, so look at the Walk column only. It has 18 + 14 = 32 pupils.
  2. In that column, 18 are girls.
  3. P(girl given walks) = 18/32.
  4. 18/32 = 9/16.

Answer: 9/16

A table of 60 pupils. The rows are Girls and Boys, the columns are Walk and Bus, and there is a Total row and a Total column. Girls: 18 walk, 12 bus, total 30. Boys: 14 walk, 16 bus, total 30. Totals: 32 walk, 28 bus, 60 in all. The Walk column is hatched.PupilsWalkBusTotalGirlsBoysTotal181230141630322860
P(girl given walks): look only at the Walk column. 18 of its 32.

Compare the two answers. P(walks given girl) = 3/5. P(girl given walks) = 9/16. They are different, because they look at different groups: the girls, and the walkers.

A wrong idea many people have

P(A given B) is the same as P(B given A).

Why it feels right: Both mention the same two events, and A and B seem to be sharing the same overlap.

The test that breaks it: The overlap is the same, 18 pupils, but it is divided by different totals. 18 out of 30 girls walk, while 18 out of 32 walkers are girls.

What is true: The event after "given" is the one you know. It sets the group you divide by. Always check which one it is.

You have met conditional chances before. In chapter 5, a bag held 5 red and 3 blue counters, and the first counter was kept. The branches for the second pick are conditional chances.

A tree diagram with two stages for picking from 5 red and 3 blue counters without putting back. From the start, 5/8 leads to Red and 3/8 leads to Blue. After Red, 4/7 leads to Red and 3/7 leads to Blue. After Blue, 5/7 leads to Red and 2/7 leads to Blue. The ends are RR: 5/14, RB: 15/56, BR: 15/56 and BB: 3/28. The two ends that start with Red are hatched.Red5/8Red4/7Blue3/7Blue3/8Red5/7Blue2/7RR: 5/14RB: 15/56BR: 15/56BB: 3/28
After a red first, the second branches are 4/7 and 3/7. They are P(second given first is red).

Worked example

Use the rule P(B given A) = P(A and B) ÷ P(A). A is "the first counter is red" and B is "the second is red". What is P(B given A)?

  1. P(A and B) = P(red, red) = 5/8 × 4/7 = 5/14.
  2. P(A) = P(first is red) = 5/8.
  3. P(B given A) = 5/14 ÷ 5/8 = 5/14 × 8/5 = 40/70.
  4. 40/70 = 4/7. This is the branch on the tree.

Answer: 4/7

There is a link with independence. Events are independent when knowing one does not change the chance of the other: P(B given A) = P(B). In the pupil table, P(walks) = 8/15 but P(walks given girl) = 3/5. These differ, so being a girl and walking are not independent in this class.

Try it

Make a two way table of twenty people

You need: a pencil and paper, twenty people to ask.

  1. Ask each person two questions: do you drink tea, and do you drink milk?
  2. Draw a table with Tea and No tea down the side, and Milk and No milk across the top.
  3. Make a mark in the right cell for each person, then count and add the totals.
  4. Find P(milk given tea): look only at the tea row.

What you will see: The row for tea has its own total. That total, and not 20, is what you divide by.

If you cannot try it, this is what happens.
A table of 20 people. The rows are Tea and No tea, the columns are Milk and No milk, with totals. Tea: 6 milk, 5 no milk, total 11. No tea: 4 milk, 5 no milk, total 9. Totals: 10 milk, 10 no milk, 20 in all. The Tea row is hatched.MilkNo milkTotalTeaNo teaTotal6511459101020

Key words

conditional probability
the chance of one event when you already know that another has happened.
given
the word that names what you already know. P(B given A) is the chance of B when A has happened.

Back to your guess

The answer is C: 18/30, because I only look at the 30 girls.

You already know the pupil is a girl, so only the 30 girls matter. Of those 30, 18 walk. The chance is 18/30 = 3/5.

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. One of the staff is chosen at random. What is the probability that this person has tea?

    A table of 50 people. The rows are Staff and Visitors, the columns are Tea and Juice, with totals. Staff: 18 tea, 6 juice, total 24. Visitors: 4 tea, 22 juice, total 26. Totals: 22 tea, 28 juice, 50 in all.PeopleTeaJuiceTotalStaffVisitorsTotal1862442226222850
    Tap your answer.
    1. Yes, that is right. Look at the Staff row only. It has 18 + 6 = 24 people, and 18 have tea. 18/24 = 3/4.

    2. Not this one. You divided by all 50 people. You know the person is staff, so only the 24 staff count. Go to M4.6.7. Try another.

    3. Not this one. That is the chance of tea for anyone in the group. You know the person is staff, so look only at the Staff row. Go to M4.6.7. Try another.

    See the answer

    3/4

    Look at the Staff row only. It has 18 + 6 = 24 people, and 18 have tea. 18/24 = 3/4.

    • If you chose B: You divided by all 50 people. You know the person is staff, so only the 24 staff count. Go to M4.6.7.
    • If you chose C: That is the chance of tea for anyone in the group. You know the person is staff, so look only at the Staff row. Go to M4.6.7.
  2. One of the people who have tea is chosen at random. What is the probability that this person is staff?

    A table of 50 people. The rows are Staff and Visitors, the columns are Tea and Juice, with totals. Staff: 18 tea, 6 juice, total 24. Visitors: 4 tea, 22 juice, total 26. Totals: 22 tea, 28 juice, 50 in all.PeopleTeaJuiceTotalStaffVisitorsTotal1862442226222850
    Tap your answer.
    1. Not this one. That is P(tea given staff). Here you know the person has tea, so look at the Tea column. Go to M4.6.7. Try another.

    2. Yes, that is right. Look at the Tea column only. It has 18 + 4 = 22 people, and 18 are staff. 18/22 = 9/11.

    3. Not this one. You divided by all 50 people. You know the person has tea, so only the 22 tea drinkers count. Go to M4.6.7. Try another.

    See the answer

    9/11

    Look at the Tea column only. It has 18 + 4 = 22 people, and 18 are staff. 18/22 = 9/11.

    • If you chose A: That is P(tea given staff). Here you know the person has tea, so look at the Tea column. Go to M4.6.7.
    • If you chose C: You divided by all 50 people. You know the person has tea, so only the 22 tea drinkers count. Go to M4.6.7.
  3. What does P(A given B) mean?

    Tap your answer.
    1. Not this one. That is P(A and B). In P(A given B), B is already known to have happened, so it is not a chance any more. Go to M4.6.7. Try another.

    2. Not this one. The order of events is not the point. What matters is that B is known to have happened. Go to M4.6.7. Try another.

    3. Yes, that is right. The word "given" names what you already know. You work in the world where B has happened.

    See the answer

    The chance of A when you know that B has happened.

    The word "given" names what you already know. You work in the world where B has happened.

    • If you chose A: That is P(A and B). In P(A given B), B is already known to have happened, so it is not a chance any more. Go to M4.6.7.
    • If you chose B: The order of events is not the point. What matters is that B is known to have happened. Go to M4.6.7.
  4. P(A and B) = 1/5 and P(A) = 2/5. What is P(B given A)?

    Tap your answer.
    1. Not this one. That is P(A and B), out of everyone. Divide by P(A) to look only at A. Go to M4.6.7. Try another.

    2. Not this one. That is P(A). To find "B given A", divide P(A and B) by it. Go to M4.6.7. Try another.

    3. Not this one. You multiplied 1/5 × 2/5. To find "given", divide by P(A). Go to M4.6.7. Try another.

    4. Yes, that is right. P(B given A) = P(A and B) ÷ P(A) = 1/5 ÷ 2/5 = 1/5 × 5/2 = 1/2.

    See the answer

    1/2

    P(B given A) = P(A and B) ÷ P(A) = 1/5 ÷ 2/5 = 1/5 × 5/2 = 1/2.

    • If you chose A: That is P(A and B), out of everyone. Divide by P(A) to look only at A. Go to M4.6.7.
    • If you chose B: That is P(A). To find "B given A", divide P(A and B) by it. Go to M4.6.7.
    • If you chose C: You multiplied 1/5 × 2/5. To find "given", divide by P(A). Go to M4.6.7.
  5. In the staff table, P(tea given staff) is 3/4 and P(tea) is 11/25. What does this show?

    Tap your answer.
    1. Yes, that is right. If the events were independent, P(tea given staff) would equal P(tea). They differ, so knowing "staff" changes the chance of tea.

    2. Not this one. Independent means the two chances are equal. 3/4 and 11/25 are not equal. Go to M4.6.7. Try another.

    3. Not this one. They match only when the events are independent. Here they differ, so the events are not independent. Go to M4.6.7. Try another.

    See the answer

    Being staff and having tea are not independent, because knowing the person is staff changes the chance of tea.

    If the events were independent, P(tea given staff) would equal P(tea). They differ, so knowing "staff" changes the chance of tea.

    • If you chose B: Independent means the two chances are equal. 3/4 and 11/25 are not equal. Go to M4.6.7.
    • If you chose C: They match only when the events are independent. Here they differ, so the events are not independent. Go to M4.6.7.
  6. From an earlier chapter

    In a group of 50, 30 play football, 25 play netball and 12 play both. How many play neither?

    See the answer

    7

    Football or netball: 30 + 25 − 12 = 43. Neither: 50 − 43 = 7.

  7. In a group of 60 learners, 24 are in the choir. 9 learners are in the choir and also play the drum. A learner in the choir is chosen. What is the probability that this learner plays the drum?

    See the answer

    3/8

    You know the learner is in the choir, so only the 24 in the choir count. 9 of them play the drum. 9/24 = 3/8.

  8. P(A and B) = 3/20 and P(A) = 6/20. What is P(B given A)?

    See the answer

    1/2

    P(B given A) = P(A and B) ÷ P(A) = 3/20 ÷ 6/20 = 3/6 = 1/2.

Keep it

Copy this into your exercise book.

P(B given A): look only at the row or column of A. P(B given A) = P(A and B) ÷ P(A). P(B given A) and P(A given B) differ. Independent: P(B given A) = P(B).

Draw: A two way table with the row of the known event hatched and the matching cell marked.

Reading with a child? A short page for the adult: what this chapter teaches and three questions to ask.

No internet tomorrow? Save the whole book as one file (868 KB). It opens on any phone.