MATH 2 • STATISTICS & PROBABILITY

Conditional Frequencies & Association — I can use conditional relative frequencies to assess association between categorical variables.

Discover whether two categorical variables are truly linked by comparing conditional relative frequencies across groups.

Historical Context & Motivation

People have always wanted to know whether two things are connected. Does studying more lead to better grades? Does a new medicine actually reduce illness? For centuries, scholars relied on intuition and anecdotes, but those approaches were unreliable. The development of two-way frequency tables and conditional relative frequencies gave us a rigorous, numerical way to assess whether categorical variables are truly associated or merely appear that way by coincidence.

1700s
Early Tabulation
Government census-takers in Europe began organizing population data into tables with rows and columns, laying the groundwork for categorical data analysis.
1900
Karl Pearson's Chi-Square Test
Karl Pearson introduced the chi-square test of independence, formalizing the idea of measuring association between categorical variables using observed versus expected frequencies.
1930s
Rise of Survey Research
Gallup polls and social science surveys popularized two-way tables as a tool for understanding public opinion, health, and demographics.
2000s
Big Data & Modern Analytics
With the explosion of digital data, conditional relative frequencies became essential in fields like marketing, medicine, and machine learning for detecting patterns across categories.

The central question this lesson addresses is straightforward but powerful: when you know which group someone belongs to, does that change the likelihood of their response? If yes, the two variables are associated. If no, they are independent. Learning to calculate and compare conditional relative frequencies gives you the tool to answer this question with data instead of guesswork.

Core Principles & Definitions

Before diving into calculations, you need to understand a few foundational ideas. A categorical variable is one whose values are labels or categories rather than numbers — for example, "favorite sport" or "grade level." When you have two categorical variables measured on the same group of individuals, you can organize the counts in a two-way frequency table (also called a contingency table). Each cell shows how many individuals fall into a particular combination of categories.

1

Joint Frequency

The count in a single cell of a two-way table — the number of individuals sharing a specific combination of two categories.
2

Marginal Frequency

The total for an entire row or column. These appear in the 'margins' (edges) of the table and summarize one variable regardless of the other.
3

Relative Frequency

A frequency expressed as a fraction, decimal, or percentage of some total. It answers "what proportion?" instead of "how many?"
4

Conditional Relative Frequency

A relative frequency calculated within a single row or column — given a specific condition. It answers "of those in this group, what proportion…?"
5

Association vs. Independence

Two variables are associated if the conditional relative frequencies differ noticeably across groups. They are independent if those frequencies are roughly equal.
KEY TAKEAWAY
Think of conditional relative frequency like this: imagine you're at a school with two lunch lines — pizza and salad. If you look only at freshmen, 70% choose pizza. If you look only at seniors, 45% choose pizza. Because the percentages differ between groups, grade level and lunch choice are associated. If both groups showed roughly 55%, the variables would be independent.

Visual Explanation — Reading a Two-Way Table

The diagram below shows a two-way frequency table for 200 students surveyed about their preferred study method (solo vs. group) and whether they earned an A on a recent exam. The marginal totals appear in the rightmost column and bottom row. Pay close attention to how the joint frequencies in the interior cells add up to the marginal frequencies on the edges.

The interior values (54, 66, 36, 44) are joint frequencies. The row and column totals (120, 80, 90, 110) are marginal frequencies. The grand total is 200.

Notice that the joint frequencies in each row add up to that row's marginal total, and the joint frequencies in each column add up to that column's marginal total. The grand total in the bottom-right corner equals the sum of all joint frequencies and also equals the sum of any complete set of marginal totals. This structure is the foundation for every calculation that follows.

Mathematical Framework

There are three types of relative frequencies you can compute from a two-way table. Understanding the difference is the key to detecting association.

JOINT RELATIVE FREQUENCY
Joint Relative Frequency = (cell count) ÷ (grand total)
Divides each interior cell by the total number of individuals. For example, 54 ÷ 200 = 0.27, meaning 27% of all students both studied solo and earned an A.
MARGINAL RELATIVE FREQUENCY
Marginal Relative Frequency = (row or column total) ÷ (grand total)
Divides a marginal total by the grand total. For example, 120 ÷ 200 = 0.60, meaning 60% of all students chose solo study.
CONDITIONAL RELATIVE FREQUENCY (BY ROW)
Conditional Relative Frequency = (cell count) ÷ (row total)
Divides a cell by its row total. This answers: "Given that a student studies solo, what fraction earned an A?" For example, 54 ÷ 120 = 0.45, or 45%.
CONDITIONAL RELATIVE FREQUENCY (BY COLUMN)
Conditional Relative Frequency = (cell count) ÷ (column total)
Divides a cell by its column total. This answers: "Of those who earned an A, what fraction studied solo?" For example, 54 ÷ 90 = 0.60, or 60%.
💡 Choosing Row vs. Column Conditions
The direction you condition on depends on your question. If you want to know how study method affects grades, condition on the study-method rows. If you want to know which study method A-students used, condition on the grade columns. Always ask yourself: "Given this group, what proportion falls into that category?"

Detecting Association with Conditional Relative Frequencies

The real power of conditional relative frequencies lies in comparison. Once you calculate conditional relative frequencies for each row (or each column), you line them up side by side. If the percentages are roughly the same across rows, the variables appear to be independent — knowing someone's row category doesn't help you predict their column category. If the percentages differ noticeably, the variables are associated.

In this hypothetical scenario, both solo and group students have the same conditional relative frequency of earning an A (45%). This signals independence. In our actual data (54 ÷ 120 = 45% vs. 36 ÷ 80 = 45%), the variables happen to look independent, but in many real datasets these percentages will differ, indicating association.
How to interpret conditional relative frequencies
ScenarioConditional FrequenciesConclusion
Solo: 45% earned A, Group: 45% earned ASame across rowsIndependent — study method does not appear to affect grade
Solo: 60% earned A, Group: 30% earned ADifferent across rowsAssociated — study method and grade appear linked
📝 How Different Is "Different Enough"?
In this course, you compare conditional relative frequencies informally — if they look noticeably different (say, more than a few percentage points apart), you say the variables appear associated. In a more advanced statistics course, you would use a formal test like the chi-square test to determine whether the difference is statistically significant.

Worked Example — Is Phone Type Associated with Age Group?

A school surveyed 250 students and staff members about which type of phone they prefer: Android or iPhone. The results are organized by age group (Under 18 and 18 or Older). Let's determine whether phone preference is associated with age group.

Phone preference by age group (n = 250)
AndroidiPhoneTotal
Under 1848112160
18 or Older454590
Total93157250
Assessing Association Between Age Group and Phone Preference
1
Step 1 — Identify the ConditionWe want to compare phone preference within each age group. So we condition on the rows (age group). Each row total becomes the denominator.
2
Step 2 — Calculate Conditional Frequencies for Under-18 GroupP(Android | Under 18) = 48 ÷ 160 = 0.30 (30%). P(iPhone | Under 18) = 112 ÷ 160 = 0.70 (70%). Among students under 18, 70% prefer iPhone.
Under 18: 30% Android, 70% iPhone
3
Step 3 — Calculate Conditional Frequencies for 18-or-Older GroupP(Android | 18+) = 45 ÷ 90 = 0.50 (50%). P(iPhone | 18+) = 45 ÷ 90 = 0.50 (50%). Among those 18 or older, preferences are split evenly.
18 or Older: 50% Android, 50% iPhone
4
Step 4 — Compare and ConcludeUnder 18: 30% Android vs. 18+: 50% Android. These conditional relative frequencies are noticeably different (a 20-percentage-point gap). Knowing someone's age group changes the predicted phone preference, so the two variables appear to be associated. Younger respondents lean more heavily toward iPhone, while older respondents are evenly split.
Age group and phone preference are associated.

Strengths, Limitations & Common Mistakes

Advantages and drawbacks of using conditional relative frequencies
StrengthsLimitations
Easy to compute — only division and comparison are needed.Does not measure the strength of association numerically; comparison is informal.
Works for any pair of categorical variables, regardless of the number of categories.Small sample sizes can produce misleading differences due to random variation.
Provides a clear, intuitive way to communicate findings ("70% of teens prefer iPhone vs. 50% of adults").Association does not imply causation — a lurking variable may be responsible for the pattern.
Useful for quick exploration before running formal statistical tests.Cannot handle numerical (quantitative) variables without first converting them into categories.
⚠️ WATCH OUT FOR COMMON MISTAKES
A frequent error is dividing by the grand total when you actually need the row or column total. Remember: if you're computing a conditional relative frequency, the denominator is the total for the group you're conditioning on, not the total for everyone. Dividing by the grand total gives you a joint relative frequency instead — a completely different statistic that answers a different question.

Connection to Advanced Statistical Concepts

The conditional relative frequency analysis you learn here is an informal, visual approach. In AP Statistics and college-level courses, you'll encounter formal tools that build directly on the same ideas.

From informal analysis to formal statistical inference
This CourseAdvanced Statistics
Compare conditional relative frequencies informally ("do the percentages look different?")Use the chi-square (χ²) test of independence to determine whether observed differences are statistically significant.
Two-way tables with two variablesMulti-dimensional contingency tables and log-linear models for three or more variables.
Conclude "associated" or "independent" based on visual comparisonCalculate p-values and confidence intervals to quantify the evidence for association.
Conditional relative frequency as a proportionConditional probability P(A | B), Bayes' theorem, and probabilistic modeling.

What you're really learning here is the conceptual foundation of conditional probability. When you compute 48 ÷ 160 and interpret it as "the probability of preferring Android given that the person is under 18," you're using the same logic behind P(A | B) = P(A ∩ B) ÷ P(B). Mastering conditional relative frequencies now will make the transition to formal probability and inference much smoother.

Practice Problems

Use the following two-way table for Problems 1–5. A school collected data from 300 students about their participation in extracurricular activities and their grade in English class.

Extracurricular participation vs. English grade (n = 300)
A or B in EnglishC or BelowTotal
In Extracurriculars10872180
Not in Extracurriculars4278120
Total150150300
PROBLEM 1CONCEPTUAL
Explain in your own words the difference between a joint relative frequency and a conditional relative frequency. Why does each use a different denominator?
PROBLEM 2BASIC CALCULATION
What is the conditional relative frequency of earning an A or B in English, given that a student participates in extracurriculars? Express your answer as a fraction, a decimal, and a percentage.
PROBLEM 3INTERMEDIATE
Calculate the conditional relative frequency of earning an A or B for both groups (In Extracurriculars and Not in Extracurriculars). Based on your comparison, do extracurricular participation and English grade appear to be associated or independent? Justify your answer.
PROBLEM 4APPLIED
A local health department surveys 400 residents about whether they received a flu vaccine and whether they got the flu that season. Of 240 vaccinated residents, 12 got the flu. Of 160 unvaccinated residents, 40 got the flu. Construct a two-way table, compute the conditional relative frequencies of getting the flu for each group, and state whether vaccination status and flu outcome appear to be associated.
PROBLEM 5CRITICAL THINKING
Suppose you find that students in extracurriculars have a higher conditional relative frequency of earning an A or B. A friend concludes, "Joining a club causes better grades." Evaluate this claim. What are at least two alternative explanations for the observed association?

Lesson Summary

A two-way frequency table organizes data for two categorical variables. Each interior cell holds a joint frequency, while the row and column totals are marginal frequencies. To find a conditional relative frequency, divide a cell count by the total of the row or column you are conditioning on — this tells you the proportion within a specific subgroup.

To assess whether two variables are associated, compare the conditional relative frequencies across groups. If they are roughly equal, the variables appear independent; if they differ noticeably, the variables appear associated. Always remember that association does not imply causation — lurking variables or study design limitations may explain the observed pattern. This informal comparison lays the groundwork for formal tests of independence you will encounter in future statistics courses.

Varsity Tutors • Math 2 • Conditional Frequencies & Association