01 / 20

Conditional
Relative Frequencies

Learn how to calculate and interpret conditional relative frequencies from two-way tables to identify possible associations between categorical variables.

Math 1

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

Joint Relative Frequency
Divide each cell by the grand total. Tells you the proportion of the whole that falls into a specific combination.
Marginal Relative Frequency
Divide a row total or column total by the grand total. Summarizes the distribution of one variable alone.
Conditional Relative Frequency
Divide each cell by its row total or column total. Shows the proportion within a specific group.

Why Conditional?

The word "conditional" means "given a specific condition." A conditional relative frequency answers questions like:

1
"Given that a student is a boy, what fraction prefers dogs?"
2
"Given that a student prefers cats, what fraction are girls?"
3
The "given" part restricts which total you divide by: a row total or a column total.

The Formula

By Row
Divide each cell by its row total. Each row sums to \(1\) (or 100%).
By Column
Divide each cell by its column total. Each column sums to \(1\) (or 100%).

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

Association Exists
The conditional relative frequencies differ noticeably across rows (or columns). Knowing one variable gives you information about the other.
No Association
The conditional relative frequencies are approximately equal across rows (or columns). The two variables appear independent.
Dogs Cats
Boys (row %) 80% 20%
Girls (row %) 50% 50%

How to Apply the Method

1
Read the question carefully. Determine which variable you are conditioning on (row or column).
2
Identify the totals. Find the row totals (if conditioning by row) or column totals (if conditioning by column).
3
Divide each cell by the appropriate total. Express results as decimals or percentages.
4
Compare the conditional distributions. If they differ noticeably, there may be an association. If they are roughly equal, no association.
5
State your conclusion in context: explain what the numbers mean about the two variables.

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

✕ Wrong Denominator
Dividing by the grand total instead of the row or column total. That gives you joint relative frequency, not conditional.
✕ Row vs. Column Confusion
Conditioning on rows when the question asks about columns (or vice versa). Read "given that..." carefully to decide.
✕ Small Differences = Association
Claiming association when conditional frequencies are only slightly different (e.g., 0.42 vs. 0.40). Small differences may be due to random variation.

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

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

Which statement best describes the association shown by conditioning on rows?