M8MATH-10.4

Two-Way Tables & Relative Frequencies

Learn to build two-way frequency tables for categorical data, calculate row and column relative frequencies, and use them to decide whether two categories are associated.

What you'll do in this lesson

A voice-first session with the Crimsora tutor on Two-Way Tables & Relative Frequencies, then targeted practice and FRQs — with the tutor adapting to where you get stuck.

What this lesson covers

Not all data comes in numbers you can plot on a scatter plot — sometimes you're comparing categories, like whether a student has a curfew and whether they do chores. A two-way table lets you organize two categorical variables side by side so you can spot patterns. In this lesson you'll build these tables, turn raw counts into row and column relative frequencies, and use those percentages to describe whether an association exists between the two variables.

What Is a Two-Way Table?

A two-way table organizes data on two categorical variables at once, letting you see how the categories of one variable relate to the categories of another. Each cell inside the table (not in a total row or column) shows a joint frequency — the count of individuals who share both traits, such as having a curfew and doing chores.

The totals along the outside edges are called marginal frequencies, because they sit in the margins of the table. They tell you how many people fall into each single category, completely ignoring the other variable. The number in the bottom-right corner is the grand total — everyone in the survey.

Before you can talk about association, the table has to be built correctly: every person is counted exactly once, in exactly one cell, based on their specific combination of the two categories. If a table doesn't add up — rows and columns don't sum to the totals — something was miscounted.

Row and Column Relative Frequencies

Once you have joint and marginal frequencies, you can turn counts into percentages called relative frequencies. Which total you divide by depends on which comparison you want to make.
TypeDivide byWhat it tells you
Row relative frequencythe row totalWithin one category of the row variable, what percent falls into each column category
Column relative frequencythe column totalWithin one category of the column variable, what percent falls into each row category
In symbols, row relative frequency=joint frequencyrow total\text{row relative frequency} = \dfrac{\text{joint frequency}}{\text{row total}} and column relative frequency=joint frequencycolumn total\text{column relative frequency} = \dfrac{\text{joint frequency}}{\text{column total}}.

Notice that a single joint frequency can produce two very different percentages depending on which total you use. A cell showing 20 students might be 40% of its row but only 25% of its column. Neither number is wrong — they just answer different questions, so always check which variable's category you're supposed to be comparing within before dividing.

Using Relative Frequencies to Spot Association

Two categorical variables show an association when the relative frequencies change noticeably from one row (or column) to the next. If the percentages stay roughly the same across every row, the variables behave independently of each other — knowing one tells you nothing new about the other.

For example, suppose 75%75\% of students with a curfew do chores, but only 50%50\% of students without a curfew do chores. Because those percentages are quite different, the data suggests an association: having a curfew tends to go along with doing chores. If both groups had come out close to 60%60\%, you'd say there's little or no association.

To check for association, pick one variable to compare across (usually the one you think might be the cause) and compute relative frequencies within each of its categories. Then compare those percentages to each other, not to the grand total. A gap of a few percentage points is usually just natural variation in the data; a gap of twenty or thirty percentage points is worth calling an association. Keep in mind this describes a pattern in the survey, not a guaranteed rule for every individual student — plenty of students without a curfew still do chores.

Common Mistakes to Avoid

The most frequent error is dividing by the grand total instead of the correct row or column total. Doing this makes every cell look small and hides the real pattern, since you're comparing a piece of the whole table instead of a piece of the specific group you care about.

Another common mistake is comparing raw counts instead of relative frequencies when group sizes are unequal. If 45 students with a curfew do chores compared to 20 students without a curfew, it's tempting to say curfew students do chores more — but if there are far more curfew students overall, the counts alone can be misleading. Percentages fix this by putting both groups on the same 0 to 100 scale.

Finally, students often mix up rows and columns when reading a question. A question asking for the percent of chore-doers who have a curfew wants a column relative frequency (dividing by the chores column total), while a question asking for the percent of curfew students who do chores wants a row relative frequency (dividing by the curfew row total). Reading the sentence carefully to identify which group you're supposed to compare within — the phrase right after 'of' — usually tells you which total to use.

Key terms

Two-way table.
A table that organizes counts of individuals according to two categorical variables at once, with one variable's categories as rows and the other's as columns.
Joint frequency.
The count in a single interior cell of a two-way table, representing individuals who share both the row category and the column category.
Marginal frequency.
A total found in the outer row or column of a two-way table, showing how many individuals fall into one category regardless of the other variable.
Relative frequency.
A joint or marginal frequency expressed as a fraction, decimal, or percent of some total, making it easier to compare groups of different sizes.
Row relative frequency.
A joint frequency divided by its row total, showing what percent of that row's category falls into each column category.
Column relative frequency.
A joint frequency divided by its column total, showing what percent of that column's category falls into each row category.
Association.
A pattern in which the relative frequencies of one variable change noticeably across the categories of the other variable, suggesting the two are related.
Categorical variable.
A variable whose values are labels or groups, such as yes/no, favorite color, or grade level, rather than numerical measurements.

Worked example

A teacher surveys 100 eighth graders about two things: whether they have a weeknight curfew and whether they regularly do chores at home. The results are:
ChoresNo ChoresTotal
Curfew451560
No Curfew202040
Total6535100
Using row relative frequencies, describe whether there seems to be an association between having a curfew and doing chores.
Step 1: Identify the row totals, since the question asks for row relative frequencies. The Curfew row totals 60 students, and the No Curfew row totals 40 students.

Step 2: Compute the row relative frequencies for the Curfew row by dividing each joint frequency by 60. Chores: 4560=0.75=75%\dfrac{45}{60} = 0.75 = 75\%. No Chores: 1560=0.25=25%\dfrac{15}{60} = 0.25 = 25\%.

Step 3: Compute the row relative frequencies for the No Curfew row by dividing each joint frequency by 40. Chores: 2040=0.50=50%\dfrac{20}{40} = 0.50 = 50\%. No Chores: 2040=0.50=50%\dfrac{20}{40} = 0.50 = 50\%.

Step 4: Compare the two rows within the Chores column. Students with a curfew do chores 75%75\% of the time, while students without a curfew do chores only 50%50\% of the time. That's a 25 percentage-point gap.

Step 5: Interpret the gap. Because the percentage of chore-doers changes noticeably depending on curfew status, the survey shows an association between having a curfew and doing chores — students with a curfew are more likely to also do chores. This doesn't prove a curfew causes chores (or the reverse); it only describes a pattern found in this group of 100 students.

Practice questions

In a class of 80 students, a two-way table shows whether students play an instrument and whether they are in the school band.
In BandNot in BandTotal
Plays Instrument301040
No Instrument53540
Total354580
What is the row relative frequency of students who play an instrument and are in band, within the 'Plays Instrument' row?
  1. 75%
  2. 37.5%
  3. 85.7%
  4. 12.5%

Answer: 75%

The question asks for a row relative frequency within the 'Plays Instrument' row, so divide the joint frequency by the row total: 3040=0.75=75%\dfrac{30}{40} = 0.75 = 75\%. Dividing by the grand total of 80 instead would incorrectly give 37.5%, and dividing by the wrong total (the Band column total of 35) would give 85.7%, which answers a different question about column relative frequency.
Using the same instrument-and-band table from the previous question, find the column relative frequency of students who play an instrument, within the 'In Band' column. What does this percentage tell you?

Answer: Approximately 85.7%

To find a column relative frequency, divide the joint frequency by the column total instead of the row total. The 'In Band' column totals 35 students, and 30 of them play an instrument, so 30350.857=85.7%\dfrac{30}{35} \approx 0.857 = 85.7\%. This tells you that among students who are in the band, about 85.7% also play an instrument outside of band — a much higher rate than the 40 out of 80, or 50%, of students overall who play an instrument, which suggests an association between being in band and playing an instrument.
A survey of 100 students records whether they have a pet and whether they do chores, producing curfew-style row relative frequencies of 60% (pet owners who do chores) and 58% (non-owners who do chores). Based on these numbers, does the data suggest a strong association between owning a pet and doing chores? Explain your reasoning.

Answer: No, the data does not suggest a strong association.

To decide whether an association exists, you compare the relative frequencies across the two groups, not just look at one number. Here the two percentages, 60% and 58%, are very close together — only a 2 percentage-point difference. Because the likelihood of doing chores barely changes whether or not a student owns a pet, the two categorical variables appear to be close to independent, meaning there is little to no meaningful association between them in this survey.

FAQ

What's the difference between a joint frequency and a marginal frequency?
A joint frequency is a count inside the table that requires both categories to be true at once, like students who have a curfew and do chores. A marginal frequency is a total along the outer edge of the table, like the total number of students with a curfew, regardless of whether they do chores. Marginal frequencies come from adding up the joint frequencies in a row or column.
How do I know whether to use row or column relative frequencies?
Read the question carefully to see which group you're supposed to compare within. If the question asks something like 'what percent of curfew students do chores,' you're working within the curfew row, so use row relative frequencies. If it asks 'what percent of chore-doers have a curfew,' you're working within the chores column, so use column relative frequencies. The category mentioned right after the word 'of' usually tells you which total to divide by.
Does finding an association in a two-way table mean one variable causes the other?
No. An association just means the relative frequencies change noticeably from one category to another, showing the variables tend to occur together in the data. It does not prove that one thing causes the other — there could be another factor involved, or the pattern could even be a coincidence in that particular group of people surveyed.
Can relative frequencies be written as decimals instead of percentages?
Yes. A relative frequency is really just a fraction, and you can express it as a fraction, a decimal, or a percent — they all mean the same thing. For example, 4560=0.75=75%\dfrac{45}{60} = 0.75 = 75\% are three ways of writing the identical relative frequency. Percentages are usually easiest for comparing groups because they put every group on the same 0 to 100 scale.

Learn this with a teacher, not a page

The Crimsora tutor teaches Two-Way Tables & Relative Frequencies live — explaining on a whiteboard, asking you questions, and adapting to where you get stuck.