Learn on PengiPengi Math (Grade 8)Chapter 8: Data Analysis and Displays

Lesson 5: Two-Way Tables and Categorical Data

In this Grade 8 Pengi Math lesson from Chapter 8: Data Analysis and Displays, students learn to construct two-way frequency tables from raw categorical data and calculate joint, marginal, and conditional relative frequencies. They use these relative frequencies to identify possible associations between two categorical variables and visualize conditional distributions through segmented bar graphs.

Section 1

Two-way frequency tables

Property

Patterns of association can also be seen in bivariate categorical data by displaying frequencies and relative frequencies in a two-way table.
A two-way frequency table is a convenient way of summarizing such data.
The table is 'two-way' because each bivariate datum is composed of an ordered pair of realizations from two categorical random variables.
The table is a 'frequency' table because the cell entries count the number of subjects that fall into each combination of categories.

Examples

  • A survey asks 100 students if they prefer pizza or burgers, and if they prefer soda or water. The results are organized in a 2×22 \times 2 table showing how many students fall into each of the four combinations (e.g., Pizza and Soda).
  • A clinic records the pet type (Dog, Cat, Bird) and reason for visit (Check-up, Sick). A 3×23 \times 2 two-way frequency table is used to count how many dogs came for a check-up, how many cats were sick, etc.
  • 8th graders are surveyed on their favorite school subject (Math, English, Science) and their after-school activity (Sports, Music, None). The data is tallied in a 3×33 \times 3 table to see if there are associations between subject preference and activities.

Explanation

When you have data in categories (like 'male'/'female' or 'cat'/'dog'), you can't make a scatter plot. A two-way table sorts this data into a grid, showing the counts for each combination, which helps you spot patterns.

Section 2

Joint and Marginal Relative Frequencies

Property

Raw counts are hard to compare, so we often convert them into percentages called relative frequencies.

To find a Joint or Marginal Relative Frequency, you ALWAYS divide by the Grand Total (the total number of all people surveyed, located in the bottom-right corner).

  • Joint Relative Frequency = Joint FrequencyGrand Total\frac{\text{Joint Frequency}}{\text{Grand Total}}
  • Marginal Relative Frequency = Marginal FrequencyGrand Total\frac{\text{Marginal Frequency}}{\text{Grand Total}}

Section 3

Identifying associations using relative frequencies

Property

Relative frequencies in two-way tables can reveal associations between categorical variables.
When the relative frequencies for one variable differ significantly across categories of another variable, this suggests an association exists between the two variables.

Examples

Book overview

Jump across lessons in the current chapter without opening the full course modal.

Continue this chapter

Chapter 8: Data Analysis and Displays

  1. Lesson 1

    Lesson 1: Scatter Plots and Bivariate Data

  2. Lesson 2

    Lesson 2: Analyzing Patterns and Associations

  3. Lesson 3

    Lesson 3: Trend Lines and Linear Models

  4. Lesson 4

    Lesson 4: Interpreting Linear Models and Predictions

  5. Lesson 5Current

    Lesson 5: Two-Way Tables and Categorical Data

Lesson overview

Expand to review the lesson summary and core properties.

Expand

Section 1

Two-way frequency tables

Property

Patterns of association can also be seen in bivariate categorical data by displaying frequencies and relative frequencies in a two-way table.
A two-way frequency table is a convenient way of summarizing such data.
The table is 'two-way' because each bivariate datum is composed of an ordered pair of realizations from two categorical random variables.
The table is a 'frequency' table because the cell entries count the number of subjects that fall into each combination of categories.

Examples

  • A survey asks 100 students if they prefer pizza or burgers, and if they prefer soda or water. The results are organized in a 2×22 \times 2 table showing how many students fall into each of the four combinations (e.g., Pizza and Soda).
  • A clinic records the pet type (Dog, Cat, Bird) and reason for visit (Check-up, Sick). A 3×23 \times 2 two-way frequency table is used to count how many dogs came for a check-up, how many cats were sick, etc.
  • 8th graders are surveyed on their favorite school subject (Math, English, Science) and their after-school activity (Sports, Music, None). The data is tallied in a 3×33 \times 3 table to see if there are associations between subject preference and activities.

Explanation

When you have data in categories (like 'male'/'female' or 'cat'/'dog'), you can't make a scatter plot. A two-way table sorts this data into a grid, showing the counts for each combination, which helps you spot patterns.

Section 2

Joint and Marginal Relative Frequencies

Property

Raw counts are hard to compare, so we often convert them into percentages called relative frequencies.

To find a Joint or Marginal Relative Frequency, you ALWAYS divide by the Grand Total (the total number of all people surveyed, located in the bottom-right corner).

  • Joint Relative Frequency = Joint FrequencyGrand Total\frac{\text{Joint Frequency}}{\text{Grand Total}}
  • Marginal Relative Frequency = Marginal FrequencyGrand Total\frac{\text{Marginal Frequency}}{\text{Grand Total}}

Section 3

Identifying associations using relative frequencies

Property

Relative frequencies in two-way tables can reveal associations between categorical variables.
When the relative frequencies for one variable differ significantly across categories of another variable, this suggests an association exists between the two variables.

Examples

Book overview

Jump across lessons in the current chapter without opening the full course modal.

Continue this chapter

Chapter 8: Data Analysis and Displays

  1. Lesson 1

    Lesson 1: Scatter Plots and Bivariate Data

  2. Lesson 2

    Lesson 2: Analyzing Patterns and Associations

  3. Lesson 3

    Lesson 3: Trend Lines and Linear Models

  4. Lesson 4

    Lesson 4: Interpreting Linear Models and Predictions

  5. Lesson 5Current

    Lesson 5: Two-Way Tables and Categorical Data