MATH 1 • STATISTICS & PROBABILITY

Conditional Relative Frequencies — I can identify possible associations between two categorical variables using conditional relative frequencies (intro).

Discover how conditional relative frequencies reveal hidden relationships between categorical variables in two-way tables.

Historical Context & Motivation

Long before modern statistics existed, people noticed that certain characteristics seemed to appear together. For instance, a doctor in the 1800s might observe that patients who worked in coal mines were more likely to develop lung disease than patients who worked outdoors. But how could someone move beyond a gut feeling and actually measure whether two categories were truly related? This question drove the development of tools for analyzing categorical data — data that falls into groups or labels rather than numerical measurements.

1700s
Early Tallying of Categorical Data
Governments began collecting census data, sorting people by occupation, region, and other categories. These early efforts created some of the first large-scale categorical datasets.
1900
Karl Pearson & the Chi-Square Test
Karl Pearson developed the chi-square test, giving statisticians a formal way to test whether two categorical variables are associated — or whether patterns appear by chance alone.
1930s
Rise of Two-Way Tables
Researchers standardized the use of two-way frequency tables (also called contingency tables) as a clear, organized format for displaying the relationship between two categorical variables.
2000s
Data Science & Modern Applications
With the explosion of digital data, conditional relative frequencies became essential in fields like marketing analytics, public health, and machine learning, where identifying associations between categories drives real-world decisions.

The fundamental question that conditional relative frequencies answer is deceptively simple: Does knowing which group someone belongs to change the likelihood of a particular outcome? If it does, we say there may be an association between the two variables. If it doesn't, we say the variables appear to be independent. Learning to calculate and interpret conditional relative frequencies gives you a powerful, accessible tool for spotting these patterns.

Core Principles & Definitions

Before diving into calculations, you need to understand several foundational ideas. A categorical variable is any variable whose values are labels or groups rather than numbers — for example, favorite subject (Math, Science, English) or transportation method (Bus, Car, Walk). A two-way frequency table organizes data about two categorical variables into rows and columns, with counts showing how many data points fall into each combination.

1

Joint Frequency

The count in a single cell of a two-way table. It tells you how many observations share a specific combination of both variables — for example, 25 students who prefer Science and ride the bus.
2

Marginal Frequency

The total for an entire row or column, found in the margins of the table. It represents the overall count for one category of a single variable, ignoring the other variable.
3

Relative Frequency

A frequency expressed as a proportion or percentage of a total. It answers the question "what fraction of the whole does this count represent?"
4

Conditional Relative Frequency

A relative frequency calculated within a specific condition — that is, within a single row or a single column. It answers: "Given this group, what proportion falls into that category?"
5

Association vs. Independence

If conditional relative frequencies differ noticeably across rows (or columns), there may be an association between the two variables. If they are roughly the same, the variables appear independent.
KEY TAKEAWAY
Think of conditional relative frequency like this: imagine you have a bag of candy sorted by color and flavor. If you reach into the red candies only and find 80% are cherry, but then reach into the blue candies and find only 30% are cherry, the color of the candy seems connected to the flavor. That's an association. But if every color group has about 50% cherry, color and flavor appear independent — knowing the color doesn't tell you anything about the flavor.

Visual Explanation — Reading a Two-Way Table

The diagram below shows a two-way frequency table that tracks 200 students by their preferred sport (Soccer or Basketball) and whether they prefer morning or afternoon classes. Notice how the joint frequencies sit inside the table, while the marginal frequencies appear along the right edge and bottom.

The table organizes 200 students by sport preference (rows) and class time preference (columns). Joint frequencies sit inside the body of the table, while marginal frequencies appear in the totals row and column.

This table is the starting point for every conditional relative frequency calculation. The joint frequencies (like 60 soccer-morning students) tell you how many observations share a specific pair of categories. The marginal frequencies (like the 90 total soccer students) tell you the overall size of a single group. To find a conditional relative frequency, you'll divide a joint frequency by the appropriate marginal frequency, which effectively zooms in on one group and asks what that group looks like.

Mathematical Framework

There are two main ways to compute conditional relative frequencies: by row and by column. Each approach conditions on one of the two categorical variables and reveals how the other variable is distributed within each group.

CONDITIONAL RELATIVE FREQUENCY (BY ROW)
Conditional Relative Frequency = Joint Frequency ÷ Row Total
This tells you: "Given that a person is in this row category, what proportion falls into each column category?" For example, of all Soccer students, what fraction prefers morning classes?
CONDITIONAL RELATIVE FREQUENCY (BY COLUMN)
Conditional Relative Frequency = Joint Frequency ÷ Column Total
This tells you: "Given that a person is in this column category, what proportion falls into each row category?" For example, of all Morning students, what fraction prefers soccer?
OVERALL RELATIVE FREQUENCY (FOR COMPARISON)
Relative Frequency = Joint Frequency ÷ Grand Total
This gives each cell as a proportion of the entire dataset, not conditioned on any row or column. Comparing conditional relative frequencies to this overall proportion can reveal associations.
💡 When to Condition by Row vs. Column
The choice depends on which variable you want to treat as the "given" condition. If your question starts with "Among students who prefer soccer…" you condition by the Soccer row. If it starts with "Among morning students…" you condition by the Morning column. Always divide by the total of whichever group you're zooming into.

Identifying Associations Using Conditional Relative Frequencies

The real power of conditional relative frequencies lies in comparing them across rows or across columns. If the distributions look roughly the same regardless of which row (or column) you examine, the variables are likely independent. If the distributions differ noticeably, there is a possible association. Let's see this in action using the sport vs. class time data from Section 3.

The stacked bars show that soccer students lean toward morning classes (66.7% morning), while basketball students lean toward afternoon classes (54.5% afternoon). Because the distributions differ, there is a possible association.

Notice the key comparison in the diagram above. Among soccer students, about two-thirds prefer morning classes. Among basketball students, fewer than half prefer morning classes. This roughly 21-percentage-point gap (66.7% versus 45.5%) suggests that sport preference and class time preference may be associated. If the two variables were independent, the morning percentage would be approximately the same in both rows — close to the overall rate of 110 ÷ 200 = 55%.

⚠️ Important Caveat
Finding different conditional relative frequencies suggests a possible association, but it does not prove causation. Soccer doesn't cause students to prefer morning classes. There might be other factors — like practice schedules — that explain the pattern. Formal hypothesis tests (like the chi-square test) are needed to determine whether the difference is statistically significant.

Worked Example

A school surveys 300 students about their preferred study method (Group Study or Solo Study) and whether they scored above or below the class median on the last test. The results are shown below:

Study Method vs. Test Performance
Above MedianBelow MedianTotal
Group Study9060150
Solo Study7080150
Total160140300
Is there a possible association between study method and test performance?
1
Step 1 — Identify the ConditionWe want to condition by row (study method). This means we ask: "Among group-study students, what proportion scored above the median?" and then compare that to the same question for solo-study students.
2
Step 2 — Calculate Conditional Relative Frequencies for Group StudyDivide each joint frequency in the Group Study row by the row total of 150.
Above Median: 90 ÷ 150 = 0.60 (60%) | Below Median: 60 ÷ 150 = 0.40 (40%)
3
Step 3 — Calculate Conditional Relative Frequencies for Solo StudyDivide each joint frequency in the Solo Study row by the row total of 150.
Above Median: 70 ÷ 150 = 0.467 (46.7%) | Below Median: 80 ÷ 150 = 0.533 (53.3%)
4
Step 4 — Compare the Conditional DistributionsAmong group-study students, 60% scored above the median. Among solo-study students, only 46.7% scored above the median. The 13.3-percentage-point difference suggests a possible association.
Conclusion: The conditional relative frequencies differ across rows, so there appears to be a possible association between study method and test performance.

Strengths & Limitations of Conditional Relative Frequencies

Strengths vs. Limitations of Conditional Relative Frequencies
AspectStrengthsLimitations
Ease of UseRequires only basic division — accessible to anyone who can work with fractions and percentages.Simplicity can be misleading if students skip the comparison step and only calculate one row.
Detecting PatternsQuickly highlights differences in distributions across groups, making associations visible at a glance.Cannot tell you whether a difference is statistically significant or due to random variation in the sample.
InterpretationPercentages are intuitive and easy to communicate to non-technical audiences.Percentages can be misleading with small sample sizes (e.g., 2 out of 3 = 66.7% sounds dramatic but is only 3 observations).
CausationUseful as a first step toward identifying relationships worthy of deeper analysis.Does not establish cause and effect. An association could be explained by lurking variables.
KEY TAKEAWAY
Conditional relative frequencies are like a flashlight in a dark room — they help you spot patterns quickly, but they can't tell you the full story about why those patterns exist. They're an essential first tool, but for stronger conclusions, you'll eventually learn formal tests like the chi-square test that account for sample size and random chance.

Connection to Advanced Statistical Analysis

Conditional relative frequencies provide a foundation for more advanced statistical reasoning. Understanding them prepares you for formal hypothesis testing and deeper work with categorical data. The table below compares what you're learning now with where the topic leads.

FeatureConditional Relative Frequencies (This Lesson)Chi-Square Test (Future Topic)
What it doesCalculates proportions within subgroups to visually detect possible associations.Calculates a test statistic and p-value to formally determine whether an observed association is statistically significant.
Math involvedDivision (joint frequency ÷ marginal frequency).Summation of squared differences between observed and expected frequencies.
Strength of conclusion"There appears to be a possible association.""We reject the null hypothesis of independence at the 5% significance level."
When you learn itMath 1 / Introductory StatisticsAP Statistics / College-level Statistics

The skills you build here — constructing two-way tables, computing conditional percentages, and comparing distributions — are exactly the skills you'll need when you encounter the chi-square test. In that test, you'll compute expected frequencies (what the table would look like if the variables were truly independent) and then measure how far the observed data deviates from those expectations. Everything starts with the conditional relative frequency thinking you're developing right now.

Practice Problems

Use the following two-way table for Problems 1–4. A school cafeteria surveyed 250 students about their lunch choice (Pizza or Salad) and their grade level (Freshman or Senior).

Lunch Choice vs. Grade Level
PizzaSaladTotal
Freshman8020100
Senior9060150
Total17080250
PROBLEM 1CONCEPTUAL
In your own words, explain the difference between a joint frequency and a conditional relative frequency. Use the Pizza-Freshman cell (80) as an example to illustrate both concepts.
PROBLEM 2BASIC CALCULATION
Calculate the conditional relative frequencies for Salad within each grade level (by row). What percentage of Freshmen chose Salad, and what percentage of Seniors chose Salad?
PROBLEM 3INTERMEDIATE
Compute the full conditional relative frequency table by row (all four cells as proportions of their row totals). Based on your results, does there appear to be an association between grade level and lunch choice? Justify your answer.
PROBLEM 4APPLIED
The cafeteria manager wants to know if she should stock more salad ingredients next year, when the current Freshmen become Sophomores. She reasons: "Freshmen only eat 20% salad, so I don't need much." Using what you know about associations in this data, explain why her reasoning might be flawed.
PROBLEM 5CRITICAL THINKING
Imagine the two-way table had shown Freshmen: 68% Pizza, 32% Salad and Seniors: 68% Pizza, 32% Salad. Would you conclude there is an association? Now suppose the table had shown Freshmen: 69% Pizza, 31% Salad and Seniors: 67% Pizza, 33% Salad. How would you interpret this small difference, and what additional information might you want before drawing a conclusion?

Lesson Summary

A two-way frequency table organizes data about two categorical variables into rows and columns. Each inside cell contains a joint frequency (the count for one specific combination), while the row and column totals are called marginal frequencies. A conditional relative frequency is found by dividing a joint frequency by its row total (conditioning by row) or column total (conditioning by column), converting the count into a proportion within a specific subgroup.

To determine whether two categorical variables may be associated, compare the conditional relative frequencies across rows (or across columns). If the distributions are noticeably different, there is a possible association. If they are roughly the same, the variables appear independent. Remember that this analysis identifies patterns but does not prove causation — additional tools like the chi-square test are needed to test whether the association is statistically significant.

Varsity Tutors • Math 1 • Conditional Relative Frequencies