Two-Way
Frequency Tables
Organize categorical data across two variables, then read joint, marginal, and conditional relative frequencies to uncover trends.
What Is Categorical Data?
Categorical data places each individual into a group or label rather than measuring a number. Examples: favorite sport, eye color, "Yes/No" survey answers, or grade level.
Anatomy of a Two-Way Table
| Plays Sport | No Sport | Total | |
|---|---|---|---|
| Boys | 30 | 10 | 40 |
| Girls | 20 | 15 | 35 |
| Total | 50 | 25 | 75 |
The rows show one variable (gender), the columns show the other (sport). Inside cells are counts. The right and bottom edges hold the totals.
Three Kinds of Relative Frequency
Joint Relative Frequency
A joint relative frequency describes one combination of both categories at once. Divide an inside cell by the grand total.
| Sport | No Sport | Total | |
|---|---|---|---|
| Boys | 30 | 10 | 40 |
| Girls | 20 | 15 | 35 |
| Total | 50 | 25 | 75 |
Marginal Relative Frequency
A marginal relative frequency looks at just one variable, ignoring the other. Divide a row or column total by the grand total.
| Sport | No Sport | Total | |
|---|---|---|---|
| Boys | 30 | 10 | 40 |
| Girls | 20 | 15 | 35 |
| Total | 50 | 25 | 75 |
Conditional Relative Frequency
A conditional relative frequency answers "within this group, what fraction...?" Divide a cell by its own row total (or column total).
| Sport | No Sport | Total | |
|---|---|---|---|
| Boys | 30 | 10 | 40 |
| Girls | 20 | 15 | 35 |
| Total | 50 | 25 | 75 |
The Critical Difference
The denominator decides the meaning. Joint and marginal divide by the grand total. Conditional divides by a row or column total.
| Joint / Marginal | Conditional | |
|---|---|---|
| Denominator | Grand total | Row or column total |
| Question | What fraction of everyone? | What fraction of this group? |
| Example | \( 30/75 \) | \( 30/40 \) |
How to Analyze a Table
Worked Example: Coffee Survey
| Likes Coffee | Dislikes | Total | |
|---|---|---|---|
| Adults | 45 | 15 | 60 |
| Teens | 12 | 28 | 40 |
| Total | 57 | 43 | 100 |
Spotting an Association
Compare the conditional rates of "Likes Coffee" for each group, using each row's own total.
Building the Marginals
From the coffee survey, find each marginal relative frequency by dividing edge totals by 100.
| Category | Total | Marginal RF |
|---|---|---|
| Adults | 60 | \( 60\% \) |
| Teens | 40 | \( 40\% \) |
| Likes Coffee | 57 | \( 57\% \) |
| Dislikes | 43 | \( 43\% \) |
Common Mistakes
Summary of Frequencies
| Type | Formula | Answers |
|---|---|---|
| Joint | \( \dfrac{\text{cell}}{\text{grand total}} \) | Fraction of everyone in a combo |
| Marginal | \( \dfrac{\text{edge total}}{\text{grand total}} \) | Fraction in one category |
| Conditional | \( \dfrac{\text{cell}}{\text{row/col total}} \) | Fraction within a group |
Question 1 of 5
Using the table (grand total \( = 75 \)), what is the joint relative frequency of girls who play no sport (count \( = 15 \))?
Question 2 of 5
A row total for "Boys" is \( 40 \) out of \( 75 \) students. This proportion \( 40/75 \) is an example of which frequency?
Question 3 of 5
Among the \( 60 \) adults, \( 45 \) like coffee. What is the conditional relative frequency of liking coffee given the person is an adult?
Question 4 of 5
Adults like coffee at \( 75\% \) while teens like it at \( 30\% \). What does this difference suggest?
Question 5 of 5
In a table where \( 57 \) of \( 100 \) people like coffee, the marginal RF "Likes Coffee" is \( 57\% \). What must the marginal RF "Dislikes" equal?
You've Got This!
You can now build two-way tables, compute joint, marginal, and conditional relative frequencies, and use conditionals to detect associations.