Math Explainer.

Conditional probability: reading a two-way table

Ages 14–16GCSE (P9)

What you will learn

In Classes A and B, 4040 pupils were asked whether they have a pet. A two-way table sorts the answers. You learn to read probabilities from it, including ones with a condition such as ‘only in Class A’.

Think first: which number do you divide by if only Class A counts? Then check: choose ‘Class A only’.

Two-way table of a survey in two classes: who has a pet?The table has one row for the pupils with a pet and one for those without, one column for Class A and one for Class B. The last row and the last column hold the totals, and the cell at the bottom right holds the number of all pupils asked. Four sliders set the four inner cells. Three buttons choose the group the question is about: everyone, Class A only or Class B only. The column of this group is tinted green with a green outline; for ‘Everyone’ it is the column of the totals. Its ‘Pet’ cell is filled green, and its total is written in green. The formula divides these two numbers: that is the probability of a pet in the chosen group.ABTotalPetNo petTotal1261881422202040
Group
P=1840=0.45P = \frac{18}{40} = 0.45

The question is about all the pupils asked. With a pet: 18 of 40. The probability of a pet is 18/40, as a decimal 0.45.

The two-way table

With ‘Class A only’ you divide by 2020 instead of 4040: the class is now the whole.

A two-way table sorts a group by two features, here with two possibilities each: class and pet. Each of the four inner cells counts one combination, for example Class A with a pet. The totals are at the edges, and the overall total is at the bottom right.

ABTotal
Pet12618
No pet81422
Total202040

If you ask about Class A only, you read a single column: 1212 out of 2020 instead of 1818 out of 4040.

Self-check

You pick one pupil at random from all 4040 who were asked. What is the probability that this pupil has no pet? Give it as a decimal.

Show the solution

2240=0.55\frac{22}{40} = 0.55. Of the 4040 pupils asked, 2222 have no pet: 88 in Class A and 1414 in Class B.

Example 1

Read off from the two-way table of the survey: you pick one pupil at random from Class B. What is the probability that this pupil has no pet?

  1. 01

    Class B only: now column B alone counts. Read off its total.

    20 in Class B20 \text{ in Class B}
  2. 02

    Read off the ‘No pet’ cell in the same column.

    14 of them without a pet14 \text{ of them without a pet}
  3. 03

    Divide the cell by the total of the column.

    P(no pet, given Class B)=1420\begin{aligned} &P(\text{no pet, given Class B}) \\ &= \frac{14}{20} \end{aligned}
  4. 04

    Simplify by dividing the numerator and the denominator by 22, and write the fraction as a decimal.

    1420=710=0.7\frac{14}{20} = \frac{7}{10} = 0.7
Answer

In Class B the probability is 0.70.7. Check: in Class B 1414 out of 2020 have no pet, clearly more than half. That fits 0.70.7.

The condition

‘Only in Class A’ is a condition. It narrows the whole down: only the pupils who meet it still count. A probability under a condition is called a conditional probability. To find it, you stay in a single row or column of the table and divide the cell by the total of that row or column.

The condition ‘Class A’ leaves only half the survey: instead of 1818 out of 4040, only 1212 out of 2020 still count.

Example 2

You meet a pupil from the survey and know only one thing: they have a pet. What is the probability that they are in Class A?

  1. 01

    The condition is ‘has a pet’. The whole is now the ‘Pet’ row: read off its total.

    18 with a pet18 \text{ with a pet}
  2. 02

    Read off the cell of Class A in the same row.

    12 of them in Class A12 \text{ of them in Class A}
  3. 03

    Divide the cell by the total of the row.

    P(Class A, given pet)=1218\begin{aligned} &P(\text{Class A, given pet}) \\ &= \frac{12}{18} \end{aligned}
  4. 04

    Simplify by dividing the numerator and the denominator by 66, and write the fraction as a decimal, rounded to two decimal places.

    1218=23≈0.67\frac{12}{18} = \frac{2}{3} \approx 0.67
Answer

The probability is 23\frac{2}{3}, so about 0.670.67. Check: of the 1818 with a pet, 1212 are in Class A and 66 in Class B, so twice as many. That fits 23\frac{2}{3}.

Self-check

Of the 2222 pupils without a pet, 1414 are in Class B. All you know about a pupil is that they have no pet. What is the probability that they are in Class B?

Your answer
Show the solution

1422\frac{14}{22}, simplified 711\frac{7}{11}: the whole is the 2222 without a pet. 1420\frac{14}{20} answers the question the other way round, ‘no pet, given Class B’. 1440\frac{14}{40} divides by all the pupils asked, as if there were no condition.

Self-check

Class B has 2020 pupils, and 66 of them have a pet. You pick one pupil at random from Class B. What is the probability that this pupil has a pet? Give it as a decimal.

Show the solution

620=0.3\frac{6}{20} = 0.3. In Class B a pet is rarer than among all the pupils asked, where the probability is 0.450.45.

For teachers: a lesson plan (45 min)
  1. 5 min

    Starter

    Open the simulation with ‘Full screen’ and leave it at ‘Everyone’. Ask first: does the probability of a pet get larger or smaller if only Class A counts? The class gives reasons from the numbers in the table. Only then does someone choose ‘Class A only’.

  2. 10 min

    Reading the table

    The figure with the two-way table: where are the totals, and what does each of the four inner cells mean? Then the first self-check, and reveal Example 1 step by step together.

  3. 10 min

    The condition

    The figure with the two bars: what is the whole for the lower bar, and where does it lie in the upper one? Let pupils try Example 2 on their own first, then reveal it. After that, discuss the ‘Watch out’ box.

  4. 15 min

    Practice

    The second and the third self-check, alone or in pairs. Anyone who finishes early uses the four sliders of the simulation to set a survey in which a pet is exactly as likely in Class A as among all the pupils asked, although the two classes differ in size.

  5. 5 min

    Plenary

    Read the ‘Remember’ box together. Ask: why are ‘pet, given Class A’ and ‘Class A, given pet’ not equally likely?

Got an exercise on paper?

Take a photo of it and Math Explainer turns it into an explainer video with every step of the solution.

Upload a photo