Conditional
Relative Frequencies
Learn how to calculate and interpret conditional relative frequencies from two-way tables to identify possible associations between categorical variables.
What Is a Two-Way Table?
A two-way table (also called a contingency table) organizes data about two categorical variables. Each cell shows the frequency (count) for a specific combination of categories.
| Prefers Dogs | Prefers Cats | Total | |
|---|---|---|---|
| Boys | 40 | 10 | 50 |
| Girls | 25 | 25 | 50 |
| Total | 65 | 35 | 100 |
Three Types of Relative Frequencies
Why Conditional?
The word "conditional" means "given a specific condition." A conditional relative frequency answers questions like:
The Formula
Whether you condition on rows or columns depends on the question you are trying to answer.
Conditioning by Row
Divide every cell by its row total. This tells you the distribution of one variable within each level of the other.
| Prefers Dogs | Prefers Cats | Row Total | |
|---|---|---|---|
| Boys | \(\frac{40}{50} = 0.80\) | \(\frac{10}{50} = 0.20\) | 1.00 |
| Girls | \(\frac{25}{50} = 0.50\) | \(\frac{25}{50} = 0.50\) | 1.00 |
Conditioning by Column
Divide every cell by its column total. This answers: "Of those who prefer dogs, what fraction are boys?"
| Prefers Dogs | Prefers Cats | |
|---|---|---|
| Boys | \(\frac{40}{65} \approx 0.615\) | \(\frac{10}{35} \approx 0.286\) |
| Girls | \(\frac{25}{65} \approx 0.385\) | \(\frac{25}{35} \approx 0.714\) |
| Column Total | 1.00 | 1.00 |
Association vs. No Association
| Dogs | Cats | |
|---|---|---|
| Boys (row %) | 80% | 20% |
| Girls (row %) | 50% | 50% |
How to Apply the Method
Example 1: Sports and Grade
A school surveyed 200 students about whether they play a sport.
| Plays Sport | No Sport | Total | |
|---|---|---|---|
| 9th Grade | 45 | 55 | 100 |
| 10th Grade | 60 | 40 | 100 |
| Total | 105 | 95 | 200 |
Example 1: Solution
| Plays Sport | No Sport | |
|---|---|---|
| 9th Grade | \(\frac{45}{100} = 0.45\) | \(\frac{55}{100} = 0.55\) |
| 10th Grade | \(\frac{60}{100} = 0.60\) | \(\frac{40}{100} = 0.40\) |
Example 2: No Association
A different school surveys 200 students on music preference.
| Pop | Rock | Total | |
|---|---|---|---|
| Boys | 42 | 58 | 100 |
| Girls | 40 | 60 | 100 |
| Total | 82 | 118 | 200 |
Example 3: Conditioning by Column
A clinic tracks patients and flu shots.
| Got Flu | No Flu | Total | |
|---|---|---|---|
| Flu Shot | 8 | 112 | 120 |
| No Shot | 32 | 48 | 80 |
| Total | 40 | 160 | 200 |
Common Mistakes
Summary Comparison
| Type | Denominator | What It Tells You |
|---|---|---|
| Joint Relative Freq. | Grand total | Proportion of entire dataset in one cell |
| Marginal Relative Freq. | Grand total | Proportion in one row or column total |
| Conditional Relative Freq. | Row or column total | Proportion within a group: used to detect association |
Question 1 of 5
In a two-way table, 30 out of 80 freshmen said "Yes" and 45 out of 120 sophomores said "Yes." What is the conditional relative frequency of "Yes" given Freshman?
Question 2 of 5
| Walk | Bus | Total | |
|---|---|---|---|
| Urban | 48 | 32 | 80 |
| Suburban | 30 | 90 | 120 |
| Total | 78 | 122 | 200 |
Based on the table above, what is the conditional relative frequency of walking given the student is suburban?
Question 3 of 5
Two rows of conditional relative frequencies (by row) are:
Row A: 0.70, 0.30
Row B: 0.68, 0.32
What can you conclude?
Question 4 of 5
You divide each cell value by the grand total of the entire table. What type of relative frequency have you computed?
Question 5 of 5
| Pass | Fail | Total | |
|---|---|---|---|
| Studied | 72 | 8 | 80 |
| Did Not Study | 33 | 87 | 120 |
| Total | 105 | 95 | 200 |
Which statement best describes the association shown by conditioning on rows?