When we ask the same group of people two yes-or-no or category questions at once, two separate lists of totals can't show how the groups overlap. For our example, we survey all 200 students at one school.
1
Joint and Marginal Frequencies
A two-way table sorts every person by both answers at the same time: one question sets the rows, the other sets the columns, and each person goes into the box where their row and column meet.
Joint and Marginal Frequencies
As the 50 musicians shift between the athlete and non-athlete groups, all four inside counts adjust together while the four marginal totals on the outside edges stay fixed at 150,50,50, and 150.
Even when the outside totals stay the same, changing how many musicians are athletes changes all four inside counts together so every row and column still adds up.
2
Completing a Two-Way Table
Often we are given a two-way table with several counts missing and need to fill them in. Because every row and column adds up to the total on its edge, any row or column with two known numbers automatically gives you the third.
Completing a Two-Way Table
Text solution
Subtract from the edge total to find missing inside counts In both the Sport row and the Instrument column, we know one inside box and the marginal total, so we subtract to find the other inside box.
Sport, No Instrument=150−30=120No Sport, Instrument=50−30=20
Add the inside counts to fill the remaining marginal totals With all four inside boxes filled, we add down the second column and across the No Sport row, then check that both edges add to the corner grand total of 200.
No Instrument total=120+30=150No Sport total=20+30=50Grand total check=150+50=50+150=200
3
Joint and Marginal Relative Frequencies
When two groups are different sizes, like 150 athletes and 50 non-athletes, comparing raw counts isn't a fair comparison. Instead, we find a relative frequency, which expresses a count as a proportion or percentage of a total:
Relative Frequency=TotalPart
To see how the entire survey of 200 students breaks down by percentage, we use the grand total of 200 in the denominator.
Joint and Marginal Relative Frequencies
Text solution
Divide each inside count by the grand total for joint relative frequencies Dividing each overlap count by the corner total of 200 gives the percentage of the whole school in each inside box.
Sport and Instrument=20030=0.15=15%Sport and No Instrument=200120=0.60=60%No Sport and Instrument=20020=0.10=10%No Sport and No Instrument=20030=0.15=15%
Divide each edge total by the grand total for marginal relative frequencies Dividing the row and column totals by 200 gives the single-category percentages for the whole school, which add up to 1.00(100%) in the bottom-right corner.
Sport total=200150=0.75=75%No Sport total=20050=0.25=25%Instrument total=20050=0.25=25%No Instrument total=200150=0.75=75%
4
Conditional Relative Frequencies
Comparing the joint percentages still doesn't account for the different sizes of the athlete and non-athlete groups. To find a percentage inside one specific group, we calculate a conditional relative frequency by looking at just that row or column and dividing by its marginal total.
Conditional Relative Frequencies
Text solution
Divide each row by its own row total to compare the two groups fairly Finding the percentage of musicians within each row separately shows how likely each group is to play an instrument.
Athletes who playan instrument=15030=0.20=20%Non-athletes who playan instrument=5020=0.40=40%
So non-athletes (40%) are actually twice as likely to play an instrument as athletes (20%), even though athletes had the larger raw count (30 vs. 20).
Use the group named right after "of" or "if" as the denominator "What percent of athletes play an instrument?" and "What percent of musicians play a sport?" both put the same 30 students on top, but they use different totals on the bottom.
Percent ofathleteswho play an instrument=Sport row total15030=0.20=20%Percent ofmusicianswho play a sport=Instrument column total5030=0.60=60%
In this table, the exact same 30 students in the Sport and Instrument box are 15% of the whole school, 20% of the athletes, and 60% of the musicians, depending on which group's total we divide by.
Looking at the whole school, one row, or one column changes which total counts as 100%, turning the same box of students into a different percentage each time.
5
Conditional Relative Frequencies from Percentages or Decimals
Sometimes a problem doesn't give raw counts at all. Instead, it only gives the whole-survey percentages (adding to 100%) or decimals (adding to 1.00), and we still need to find a conditional relative frequency.
Conditional Relative Frequencies from Percentages or Decimals
Text solution
Divide the inside percentage by the row or column marginal percentage Because percentages mean parts per 100, dividing the overlap percentage by the group's marginal percentage gives the exact same result as dividing the raw counts.
Athletes who play an instrument=75%15%=7515=0.20=20%
Use the same division when the table is given in decimals Take the overlap decimal (0.15) and divide by the Sport row total (0.75) when the condition is playing a sport, or by the Instrument column total (0.25) when the condition is playing an instrument.
Given Sport, plays an instrument=0.750.15=0.20=20%Given Instrument, plays a sport=0.250.15=0.60=60%
If dividing decimals or percentages ever feels strange, just pretend the survey had 100 people. Then 0.15(15%) is 15 people out of 75 people (0.75, or 75%).
6
Association in Two-Way Tables
An association between two categories means that knowing a person's answer to the first question changes how likely they are to give a certain answer to the second question. We test for an association by comparing the conditional relative frequencies across the groups.
Association in Two-Way Tables
Text solution
Compare the conditional percentages between the two groups We look at the percentage of musicians among athletes alongside the percentage of musicians among non-athletes.
Athletes who playan instrument=15030=20%Non-athletes who playan instrument=5020=40%
Because 20% and 40% are noticeably different, there is an association between playing a sport and playing an instrument.
Equal conditional percentages (20% of athletes vs. 20% of non-athletes) mean no association, while equal raw counts (20 vs. 20) in differently sized groups give very different percentages (about 13% vs. 40%) and show a clear association.
Two variables are associated when the percentages differ between the two groups, not when the counts are different.
Key concepts
Working with a two-way table comes down to deciding whether you need a raw count or a percentage, and then asking "Out of who?" before you divide:
Raw counts (frequencies)
When a question asks "how many," read the count directly without dividing. An inside box where two categories meet is a joint frequency(30 play both a sport and an instrument), and an outside edge total is a marginal frequency(150 play a sport). Use Box+Box=Edge to fill in any missing counts.
Relative frequencies (Part÷Total)
When a question asks for a proportion, decimal, or percent, pick the denominator from the group being described:
Out of everyone surveyed: Divide by the grand total in the bottom-right corner (200). Inside boxes give joint relative frequencies(20030=15%), and edge totals give marginal relative frequencies(200150=75%).
Out of one specific group (conditional): Look right after "of", "among", or "given that" and divide by that single row or column's marginal total, whether the table shows counts or whole-group decimals. Among athletes, 15030=0.750.15=20% play an instrument; among musicians, 5030=0.250.15=60% play a sport.
Checking for association
Don't compare raw counts (30 vs. 20) when groups are different sizes. Compare the conditional percentages from one group to the next. Noticeably different percentages (20% of athletes vs. 40% of non-athletes) mean there is an association, while equal percentages (25% vs. 25%) mean no association. Nearly equal percentages show only a small difference between the groups.
7
Practice
1
A school surveyed 250 students about how they get to school and whether they bring or buy lunch. Fill in the missing numbers in the two-way table below, then state (a) the joint frequency of students who walk and buy lunch, and (b) the marginal frequency of students who walk.
Bring Lunch
Buy Lunch
Total
Walk
30
?
?
Ride
?
110
170
Total
90
?
250
Look for a row or column that is only missing one number first. Which rows or columns already have two of their three numbers filled in?
Start with the Ride row and the Total column, since each is only missing one number:
Completed rows: Walk: 30,50,80; Ride: 60,110,170; Total: 90,160,250. Watch out for swapping the terms "joint" and "marginal" (which reverses the two answers to 80 and 50): a joint frequency is an inside overlap, and a marginal frequency is an edge total. (a) 50 (b) 80
2
A movie theater surveyed 400 customers about their showtime and whether they bought popcorn.
Popcorn
No Popcorn
Total
Matinee
56
84
140
Evening
164
96
260
Total
220
180
400
Find (a) the joint relative frequency of customers who went to an evening show and bought popcorn, and (b) the marginal relative frequency of customers who went to a matinee.
In part (a), don't divide 164 by the Evening row total of 260 (which gives approximately 0.631, or 63.1%) or the Popcorn column total of 220 (which gives approximately 0.745, or 74.5%); those divide by a single group's total instead of everyone surveyed.
Neither question is limited to a single row or column. Which total goes on the bottom when a question is about all customers surveyed?
Both questions ask for a share of the whole survey, so divide by the corner grand total of 400. In part (a), don't divide 164 by the Evening row total of 260 (which gives approximately 0.631, or 63.1%) or the Popcorn column total of 220 (which gives approximately 0.745, or 74.5%); those divide by a single group's total instead of everyone surveyed. (a) 400164=0.41, or 41% (b) 400140=0.35, or 35%
3
An animal shelter tracks its 150 pets by species and whether they are microchipped.
Microchipped
Not Microchipped
Total
Dogs
72
18
90
Cats
48
12
60
Total
120
30
150
(a) What percent of the dogs are microchipped? (b) What percent of the microchipped pets are dogs?
Be careful not to divide by the grand total of 150 (which gives 15072=48%, the percent of all shelter pets that are microchipped dogs) or to swap the row total (90) and column total (120) between the two parts.
Both questions put the same 72 microchipped dogs in the numerator. Look at the group named right after "of" in each question to choose the denominator.
Both parts start with the 72 pets in the Dogs and Microchipped box, but the denominator changes with the group after "of". Be careful not to divide by the grand total of 150 (which gives 15072=48%, the percent of all shelter pets that are microchipped dogs) or to swap the row total (90) and column total (120) between the two parts. (a) Out of the 90 dogs: 9072=0.80, or 80% (b) Out of the 120 microchipped pets: 12072=0.60, or 60%
4
A survey asked commuters where they live and how they get to work. The table shows the relative frequencies for the whole survey as decimals:
Train
Drive
Total
City
0.28
0.07
0.35
Suburbs
0.12
0.53
0.65
Total
0.40
0.60
1.00
What is the conditional relative frequency that a commuter lives in the city, given that they take the train?
Watch out for two common mistakes: writing down the joint decimal 0.28(28%) without dividing, or dividing by the City row total of 0.35 (which gives 0.350.28=0.80, or 80%, the relative frequency of taking the train given that a commuter lives in the city).
The phrase "given that they take the train" narrows the table to one group. Which marginal decimal is that group's total?
The overlap of City and Train is 0.28, and the condition "given that they take the train" puts the Train column total of 0.40 on the bottom. Watch out for two common mistakes: writing down the joint decimal 0.28(28%) without dividing, or dividing by the City row total of 0.35 (which gives 0.350.28=0.80, or 80%, the relative frequency of taking the train given that a commuter lives in the city).
0.400.28=0.70, or 70%
5
A high school surveyed 200 underclassmen and 50 upperclassmen about whether they have a part-time job.
Job
No Job
Total
Underclassmen
50
150
200
Upperclassmen
30
20
50
Total
80
170
250
A student looks at the Job column and says, "50 is greater than 30, so underclassmen are more likely to have a part-time job than upperclassmen." Use conditional relative frequencies to explain why this conclusion is wrong.
Notice how many underclassmen were surveyed compared to upperclassmen. Which total should you divide each group's job count by to make the comparison fair?
Comparing raw counts (50 vs. 30) is unfair because 4 times as many underclassmen were surveyed (200 vs. 50). To compare the two groups fairly, divide each group's job count by its own row total. Don't divide by the Job column total of 80 (which gives 8050=62.5% and 8030=37.5%, making the same mistake because underclassmen make up most of the survey).
Underclassmen with a jobUpperclassmen with a job=20050=25%,=5030=60%
Among underclassmen, only 25% have a job, whereas among upperclassmen, 60% have a job, so upperclassmen are actually more than twice as likely to have a part-time job.
6
A grocery store tracked 240 shoppers to see whether they shopped on a weekday or the weekend and whether they used a coupon.
Coupon
No Coupon
Total
Weekday
45
135
180
Weekend
15
45
60
Total
60
180
240
Does the table show an association between when a person shops and whether they use a coupon? Use conditional relative frequencies to justify your answer.
Compare the percentage of weekday shoppers who used a coupon to the percentage of weekend shoppers who used a coupon. Does the day of the week change how likely a shopper is to use a coupon?
Don't compare the raw counts of 45 and 15 (or divide by the Coupon column total of 60 to get 75% vs. 25%) and conclude that weekday shoppers are three times as likely to use a coupon; three times as many weekday shoppers were surveyed (180 vs. 60). Instead, find the conditional percentage of coupon users within each group's row: