AP Statistics Two Categorical Variables and Two-Way Tables Lesson (Free PDF)

AP Statistics math lesson: Two Categorical Variables and Two-Way Tables – Maths PDFCover of the book AP Statistics Math Lessons (PDF)Download as a PDFThe AP Statistics math lessons bookPrintable PDFSee the book ›


This two categorical lesson for AP Statistics covers two categorical variables and two-way tables (Common Core AP STAT 2.1, AP STAT 2.2, AP STAT 2.3, HSS-ID.B.5), with a free PDF to print.

A two-way table summarizes two categorical variables. Marginal relative frequencies describe one variable alone, joint relative frequencies describe two traits together, and conditional relative frequencies describe one variable within a group. If the conditional distributions of the response differ across the explanatory groups, the variables are associated.

AP Statistics · Common Core State Standards: AP STAT 2.1, AP STAT 2.2, AP STAT 2.3, HSS-ID.B.5

Key facts in this two categorical lesson

Key facts
  • Two-way tables show counts for combinations of two categorical variables.
  • Marginal = total / grand total; joint = cell / grand total; conditional = cell / group total.
  • Compare conditional percentages of the response across explanatory groups to detect association.
  • Segmented bar graphs display conditional distributions side by side.
  • Association is not causation, and combined data can hide Simpson’s paradox.

How do you organize two categorical variables?

A two-way table shows how individuals fall into categories of two categorical variables at once. When one variable might explain the other, it is the explanatory variable and the other is the response variable.

Job \ YearJuniorSeniorTotalHas a job305585No job9045135Total120100220
Counts of 220 students by job status and year. Row and column totals are the marginal counts.

Here year in school is the explanatory variable and having a job is the response variable. The totals on the edges are the marginal counts.

What are marginal, joint, and conditional relative frequencies?

TypeQuestion it answersExampleMarginalOne variable alone85/220 = 38.6% have a jobJointBoth traits together30/220 = 13.6% are juniors with a jobConditionalGiven one group30/120 = 25% of juniors have a job
Three kinds of relative frequency from the same two-way table.
  • A marginal relative frequency divides a row or column total by the grand total.
  • A joint relative frequency divides one cell by the grand total.
  • A conditional relative frequency divides a cell by the total of the group you are given.

How do you decide whether two variables are associated?

Explanatoryyear in schoolResponsehas a job?Compareconditional %s
Condition on the explanatory variable, then compare the response percents.
  1. Identify the explanatory and response variables.
  2. Compute the conditional relative frequencies of the response within each explanatory group.
  3. Compare them. If they differ noticeably, there is an association.
  4. Describe it in context, with numbers.
0%20%40%60%80%100%Percent25%75%Junior55%45%SeniorJobNo jobYear in school
Segmented bar graph of the conditional distribution of job status within each year.

Within juniors, \(\frac{30}{120}=25\%\) have a job. Within seniors, \(\frac{55}{100}=55\%\) do. The percents differ a lot, so seniors are more likely to have a job: year and job status are associated. A segmented bar graph makes the comparison visible.

Why can a table mislead?

Association is not causation. Being a senior does not cause a job; older students simply have more time and freedom. Also, a pattern in combined data can reverse when you split the data by a third variable, a reversal called Simpson’s paradox. Always ask whether a lurking variable could change the story.

Two categorical lesson: questions and answers

What is the difference between joint and conditional relative frequency?

A joint relative frequency divides a single cell by the grand total, answering ‘what fraction of everyone has both traits?’ A conditional relative frequency divides by the total of a given group, answering ‘among this group, what fraction has the trait?’

How do I choose which conditional percentages to compute?

Condition on the explanatory variable. Divide each cell by its explanatory group total so each group’s response percents add to 100%.

What does it mean for two variables to be associated?

It means knowing the value of one variable helps predict the other. In a table, the conditional distributions of the response are different for different explanatory groups.

What is Simpson’s paradox?

It is a reversal in which a comparison favoring one group in the combined data flips when the data are split by a lurking variable. It happens when the groups have very different sizes across the subgroups.

Can a segmented bar graph show causation?

No. It shows association only. Causation requires a well-designed randomized experiment that controls for other variables.

How to use this two categorical lesson

Read the definitions first, then follow the worked method line by line and redo the example on paper without looking. When every step makes sense, move on to the worksheet, then check yourself with the quiz.

Download the two categorical lesson as a PDF with the button below and keep it with your notes.

All AP Statistics chapters: AP Statistics math.

Voter.. post

Free printable PDF

AP Statistics Two Categorical Variables and Two-Way Tables Lesson

US Letter58 KBPrints in black and white

Download PDF