topic badge
Middle Years

12.04 Two-way tables

Lesson

Two-way tables

Two-way tables represent data that is classified by two criteria. If the first criterion was a student's main writing hand, and the other was whether or not they enjoy English, we could produce a table like this:

  Right Left
Enjoys English $4$4 $9$9
Doesn't enjoy English $2$2 $15$15
The columns show the writing hand, and the rows show their enjoyment of English.

To read a two way table, look at the column and row that a number is in to find the right cell, the box where a single number is written. For example there are $9$9 students who are left-handed and enjoy English (top-right cell), and $2$2 students who are right handed that don't enjoy English (bottom-left cell).

Tables will often inclue totals of each column, each row, and the total sum in the corner:

  Right Left Total
Enjoys English $4$4 $9$9 $13$13
Doesn't enjoy English $2$2 $15$15 $17$17
Total $6$6 $24$24 $30$30
The categories should always be chosen so that each data point goes in exactly one of the cells.

Worked example

A pet store sells three types of animals. Some of them have spots, some do not. This two-way table represents the animals they have for sale one day:

  Cat Dog Fish
Has spots $7$7 $4$4 $11$11
No spots $5$5 $10$10 $8$8
If the store owner chooses an animal at random, what is the probability that they will select a fish?

Think: We can use the following formula to find the probability:

$\text{Probability}=\frac{\text{Number of favourable outcomes}}{\text{Total number of outcomes}}$Probability=Number of favourable outcomesTotal number of outcomes

We will need to find the total number of animals and the number of fish to substitute into the formula.

Do: The number of spotted fish is the number in the top-right cell, and the number of fish without spots is the number in the bottom-right cell. Adding these together tells us that there are $11+8=19$11+8=19 fish altogether.

The total number of animals is all the numbers added together, $7+4+11+5+10+8=45$7+4+11+5+10+8=45.

This means the probability is $\frac{19}{45}$1945.

 

Two way tables and Venn diagrams

A two way table often presents information that could also be presented with a Venn diagram. We can convert between a two way table and a Venn diagram by matching up their different parts.

This two-way table represents the handedness of students, and whether or not they entered the Talent Show:

To represent this information in a Venn diagram, we choose one row and one column to become circles. Here we chose the column marked "Left" and the row marked "Entered":

 

  • The number that is in both chosen categories $\left(4\right)$(4) goes in the overlap of the two circles.
  • The other value in the "Entered" row $\left(9\right)$(9) represents the "Entered and right-handed" students, and goes in the "Entered" circle outside the overlap.
  • The other value in the "Left" column $\left(2\right)$(2) represents the "Didn't enter and left-handed" students, and goes in the "Left-handed" circle outside the overlap.
  • Any cells that are in neither the highlighted row nor the highlighted column $\left(15\right)$(15)goes into the surrounding box, outside both circles.

 

Worked example

Using this Venn diagram:

Create a two-way table representing the same information.

 

Think: Each circle represents a category, so each circle name should be a heading - one a row heading, and one a column heading.

The numbers outside the "Cut" circle are "Not cut", and the numbers outside the "Dyed" circle are "Not dyed", so they should be the other headings.

Do: The empty two way table will look like this:

  Cut Not cut
Dyed    
Not dyed    
Using the Venn diagram we can fill in the table by looking at the corresponding regions. The top left cell is for the number of people who had their hair cut and dyed, which was $35$35 people. The bottom left cell is for the number of people who had their hair cut but not dyed, which was $12$12. Filling in the rest of the table like this gives us the final result:
  Cut Not cut
Dyed $35$35 $20$20
Not dyed $12$12 $3$3

Practice questions

Question 1

$50$50 students were asked whether or not they were allergic to nuts and dairy. The two way table is provided below.

  Allergic to Nuts Not Allergic to Nuts
Allergic to Dairy $6$6 $11$11
Not Allergic to Dairy $6$6 $27$27
  1. How many students are allergic to nuts?

  2. How many students are allergic to nuts or dairy, or both?

  3. How many students are allergic to at most one of the two things?

Question 2

A student makes a Venn diagram of students who are late to school, and students who catch the bus to school.

  1. Complete the following table:

      Late Not late
    Caught bus $\editable{}$ $\editable{}$
    Didn't catch bus $\editable{}$ $\editable{}$
Question 3

Students in Irene's class were asked if they owned a dog and asked if they owned a snake. The following two way table shows that information.

  Owns a dog Doesn't own a dog
Owns a snake $2$2 $3$3
Doesn't own a snake $13$13 $11$11

 

  1. Which of the following Venn diagrams represents the information provided in the two way table?

    A

    B

    C

    D

 

What is Mathspace

About Mathspace