topic badge

9.04 Two-way frequency tables

Lesson

Concept summary

A two-way frequency table, or joint frequency table, can be used to summarize bivariate categorical data. It is a data display that shows how many data values fit into multiple categories.

Marginal frequency

How often a particular category of data occurred, found in the "total" row and column of a two-way frequency table

Joint frequency

In a two-way table, joint frequency is the number of times a combination of two conditions occurs

A two-way frequency table with no title but with 4 columns and 5 rows. Titles from the second column are Child, Adult, and Total. First row has no title. Titles starting from the second row are Drawing, Painting, Graphics, and Total. The data is as follows: Drawing: Child, 22, Adult, 8, Total, 30; Painting: Child, 18, Adult, 7, Total, 25; Graphics: Child, 9, Adult, 36, Total, 45; Total: Child, 49, Adult, 51, Total, 100. On the right side of the table is an arrow pointing down that is labelled Add down. At the bottom is an arrow pointing to the right labelled add across. The numbers in the Column and Row for Total except for the last number are labelled as Marginal Frequencies. The numbers inside the boxes of combined conditions are labelled Joint frequencies.

Worked examples

Example 1

The two-way frequency table displays the number of people at Chili Fest with which kind of chili they bought and whether they added extra spice or not.

Added spiceDid not add spiceTotal
Meat331401732
Vegetarian12543168
Total456444
a

Describe the group of people which has exactly 401 people in it.

Approach

We should find 401 in the table and look up and across to identify the corresponding headings.

Solution

The number 401 lies in the row for people who chose meat and in the column for people who did not add spice. This means that there were 401 people who chose meat chili and did not add spice.

b

Identify whether the number of people who chose vegetarian chili is a marginal or joint frequency and state its value.

Approach

It is not specified whether this group added extra spice or not, so we are looking at all people who chose the vegetarian chili.

Solution

Since we are looking at the total number of people who chose vegetarian chili, this is a marginal frequency.

There are 168 people who chose the vegetarian chili.

c

Calculate the total number of people who ate chili at Chili Fest.

Approach

We can find this total in a variety of ways:

  • Add all the joint frequencies
  • Add the marginal frequencies for the type of chili
  • Add the marginal frequencies whether they added spice or not

Solution

Let's add the marginal frequencies for the type of chili.

\text{Meat}+\text{Vegetarian}=732+168=900

There were 900 people who ate chili at Chili Fest.

Reflection

We can check this by adding up all of the joint frequencies.

331+401+125+43=900

Example 2

A scientist recorded some data on the flowering pattern and type of soil for a variety of coreopsis plants:

  • 1000 plants were observed
  • 136 plants did not flower
  • 394 plants that did flower were planted in peat soil
  • 30 plants that were planted in sandysoil did not flower

The data can be organized into a joint frequency table:

FloweredDid not flowerTotal
Peat soil
Sandy soil
Total
a

Complete the table based on the given information about coreopsis plants.

Approach

We can first fill in the given information and then subtract joint frequencies from the marginal frequencies to get the missing joint frequencies and subtract marginal frequencies from the total to get the missing marginal frequencies.

Solution

FloweredDid not flowerTotal
Peat soil394
Sandy soil30
Total1361000

Based on the information we have been given, we can already determine:

  • Marginal frequency for number that flowered: 1000-136=864
  • Joint frequency: 136-30=106
FloweredDid not flowerTotal
Peat soil394106
Sandy soil30
Total8641361000

Based on the new calculated information, we can determine:

  • Marginal frequency for number planted in peat soil: 394+106=500
  • Then the marginal frequency for number planted in peat soil: 1000-500=500
  • Joint frequency for plants that flowered in sandy soil: 864-394=470
FloweredDid not flowerTotal
Peat soil394106500
Sandy soil47030500
Total8641361000

Reflection

We can always check by adding across each row and down each column to ensure the marginal frequency is the sum of the joint frequencies.

b

Keshawn said because there were a total of 1000 plants observed and 30 plants that were planted in sandy soil did not flower, this means 1000-30=970 were planted in peat soil and did flower. Identify and correct his error.

Solution

Keshawn seems to have a misconception around how joint frequencies relate to one another. He has stated that \text{sandy and flowered}+\text{peat and not flowered}=\text{Total} while it should be\text{sandy and flowered}+\text{sandy and not flowered}+\text{peat and flowered}+\text{peat and not flowered}=\\ \text{Total}

We need to consider all possible cases, not just opposite cases.

He should have said that because there were a total of 1000 plants observed and 30 plants that were planted in sandy soil did not flower, this means 1000-30=970 were planted in peat soil or were planted in sandy soil did not flower.

Outcomes

MA.912.DP.1.2

Interpret data distributions represented in various ways. State whether the data is numerical or categorical, whether it is univariate or bivariate and interpret the different components and quantities in the display.

MA.912.DP.3.1

Construct a two-way frequency table summarizing bivariate categorical data. Interpret joint and marginal frequencies and determine possible associations in terms of a real-world context.

What is Mathspace

About Mathspace