This course has been archived. The College Board updated AP Statistics for the 2026–27 school year, and the units and topics changed.
Go to the new AP® Statistics
6m left·0%
Reading Time: 6 min
Last Updated: February 5, 2026
Main Ideas: 5
Reading Time: 6 min
Last Updated: February 5, 2026
Main Ideas: 5

Topic 2.3 Notes – Statistics for Two Categorical Variables

Read aloud
You’ll use two-way tables to calculate marginal and conditional relative frequencies, then compare those to decide whether the variables are associated or independent. This is foundational for later topics like chi-square tests.

Two-way tables and what they show

A two-way table (also called a contingency table) organizes data for two categorical variables.

  • One variable labels the rows.
  • The other labels the columns.
  • Each interior cell shows a joint frequency (count in both categories).
  • The margins show row totals, column totals, and the grand total.

Here’s a simple example layout using school type and whether students play sports:

Two-way table: school type and sports participation

In this table, each interior value is a joint count. For example, 120 students are in public school and play sports. The totals along the right and bottom margins summarize each variable separately.

From a table like this, you can answer questions such as:

  • How many students are in public school?
  • How many private school students play sports?
  • What percent of all students play sports?

Those last types of questions require relative frequencies.

Marginal relative frequencies

A marginal relative frequency uses a row or column total divided by the grand total.

Marginal relative frequency=row or column totalgrand total \text{Marginal relative frequency} = \frac{\text{row or column total}}{\text{grand total}}

It describes the overall distribution of one variable by itself.

Example using the table idea: If 180 out of 300 total students play sports, then
180300=0.60 \frac{180}{300} = 0.60

Interpretation (in context): “Overall, 60% of the students in the sample play a school sport.”

Notice we didn’t separate by school type. That’s what makes it marginal. It ignores the second variable.

Students often mix this up with conditional. Quick memory trick: marginal lives in the margins of the table.

Conditional relative frequencies

A conditional relative frequency looks at a proportion within one row or one column.

Conditional relative frequency=cell countrow or column total \text{Conditional relative frequency} = \frac{\text{cell count}}{\text{row or column total}}

Now the denominator is not the grand total.

Suppose 120 of 200 public school students play sports:

120200=0.60 \frac{120}{200} = 0.60

Interpretation: “Among public school students, 60% play a school sport.”

That phrase “among public school students” tells you it’s conditional. You are conditioning on school type.

If instead you calculated
60100=0.60 \frac{60}{100} = 0.60
for private school students, you’d say: “Among private school students, 60% play a school sport.”

Now you can compare.

Comparing distributions and deciding association

This is the heart of the topic.

You are usually comparing the distribution of a response variable given different categories of an explanatory variable.

In practice:

  1. Decide which variable explains and which responds.
  2. Calculate the conditional relative frequencies of the response variable for each group.
  3. Compare those percentages across groups.

You might organize your comparison like this:

Plays SportsPublic SchoolPrivate School
Yes60%60%
No40%40%

If the conditional distributions are similar, the variables are likely independent (no association).

If they are different, the variables are associated.

Another way to think about it:

  • If the conditional relative frequencies are different from each other, or noticeably different from the marginal distribution, that suggests an association.

How to write the conclusion

Associated: “There is an association between school type and sports participation because the conditional distribution of sports participation differs between public and private school students.”

Not associated: “There is no evidence of an association between school type and sports participation because the conditional distributions are similar across the two school types.”

On quizzes and the AP exam, you must:

  • Use the word association or independent correctly.
  • Reference conditional relative frequencies.
  • State everything in context.

Common mistakes

  • Dividing by the grand total when the question is conditional.
  • Comparing raw counts instead of percentages.
  • Forgetting to say “among ___” when interpreting a conditional.
  • Claiming one variable causes the other. A two-way table alone only shows association.

Key Takeaways

Marginal relative frequency uses the grand total as the denominator.
Conditional relative frequency uses a row or column total as the denominator.
To check for association, compare conditional distributions of the response variable across groups.
If conditional distributions are similar, the variables are independent.
Conclusions must describe the variables and population in context, not in generic terms.

AP® is a trademark registered by the College Board, which is not affiliated with, and does not endorse this website.

Notes

1 credit used · 5/5 remaining