AP Statistics · Study guide

Same cell. Three percentages.

AP® Statistics · Unit 2 · Probability, Random Variables, and Probability Distributions

Summary Statistics for Two Categorical Variables

Joint, marginal, and conditional relative frequencies from a two-way table: what each one divides by, how conditional distributions reveal an association, and how to back up a claim with the right fraction.

The idea in one paragraph

Every summary from a two-way table is a fraction, and the only question is what goes in the denominator. Divide a cell by the grand total for a joint relative frequency, a row or column total by the grand total for a marginal one, and a cell by its own row or column total for a conditional one. Comparing conditional relative frequencies across groups is how you find an association.

1The table

A survey of 300 students asked whether they have a part-time job and how much homework they usually do on a school night.

Under 1 hour1 to 2 hoursOver 2 hoursTotal
Job544818120
No job369054180
Total9013872300

2Three kinds of relative frequency

KindDivideByExample
Jointone cellthe grand total\(54 \div 300 = 0.18\): 18% of all students have a job and do under 1 hour
Marginala row total or a column totalthe grand total\(120 \div 300 = 0.40\): 40% of all students have a job
Conditionalone cellthe total of its row (or its column)\(54 \div 120 = 0.45\): of students with a job, 45% do under 1 hour
Figure 1. Rows are job (top) and no job (middle); columns are under 1 hour, 1 to 2 hours, over 2 hours, and total. The three kinds of relative frequency differ only in what you divide by.

The words “marginal” and “joint” describe where the numbers sit. Marginal totals sit in the margins of the table. A joint frequency joins two conditions in one cell: has a job and does under an hour. A conditional relative frequency restricts attention to one row or one column, a particular category of interest, and asks how that group splits.

Worked Example 1 Joint, marginal, conditional

Jobs and homework

Use the two-way table of 300 students. Find (a) the proportion of all students who have a job and do over 2 hours of homework, (b) the proportion of all students who do 1 to 2 hours, and (c) the proportion of students without a job who do over 2 hours.

  1. 1(a) A joint relative frequency: the job, over 2 hours cell divided by the grand total, \(18 \div 300 = 0.06\).
  2. 2(b) A marginal relative frequency: the 1 to 2 hours column total divided by the grand total, \(138 \div 300 = 0.46\).
  3. 3(c) A conditional relative frequency: restrict to the 180 students without a job. \(54 \div 180 = 0.30\).
Answer: 0.06, 0.46, and 0.30. The wording tells you the denominator: “of all students” means 300; “of students without a job” means 180.
Common Mistake 1 · Using the grand total for a conditional question

“What proportion of students with a job do under an hour?” restricts to students with a job, so the denominator is 120, not 300. \(54 \div 300 = 0.18\) answers a different question: what proportion of all students have a job and do under an hour.

3Conditional distributions and association

Doing the conditional calculation for every cell in a row gives the conditional distribution of the column variable for that group. Comparing the conditional distributions across groups shows whether the variables are associated: if the distributions differ, they are.

Under 1 hour1 to 2 hoursOver 2 hoursTotal
Job (÷ 120)0.450.400.151.00
No job (÷ 180)0.200.500.301.00
All students (÷ 300)0.300.460.241.00
Figure 2. The first two bars are conditional distributions of homework time, one for each job group. The third is the marginal distribution for everyone. Because the job and no-job bars differ, the variables are associated.
Worked Example 2 Compare conditional distributions

Is having a job associated with homework time?

Find the conditional distribution of homework time for each job group, and decide whether the two variables are associated.

  1. 1Job (divide by 120): \(54 \div 120 = 0.45\), \(48 \div 120 = 0.40\), \(18 \div 120 = 0.15\).
  2. 2No job (divide by 180): \(36 \div 180 = 0.20\), \(90 \div 180 = 0.50\), \(54 \div 180 = 0.30\).
  3. 3If the variables were not associated, the two distributions would be about the same. They are not: 45% of students with a job do under an hour, compared with 20% of students without one.
Answer: There is an association. Students with a part-time job were more likely to do under 1 hour of homework (45% compared with 20%) and less likely to do over 2 hours (15% compared with 30%).
Say it like this

Compare a conditional relative frequency between groups, in context: “Students with a part-time job were more likely to do under an hour of homework than students without one (45% compared with 20%). This suggests an association between having a job and homework time for these students.”

Common Mistake 2 · Looking only at the marginal distribution

The marginal distribution (30%, 46%, 24%) describes everyone together. It cannot show an association, because it never separates the groups. Association lives in the comparison of conditional distributions.

4Which way to condition

A conditional relative frequency can be computed within a row or within a column. The two answer different questions, and confusing them is one of the most common errors with two-way tables.

Figure 3. The same 54 students give two different conditional relative frequencies, depending on which group is the “given.” The group named after “of” or “among” supplies the denominator.
Worked Example 3 Match the question to the fraction

Four questions

  1. What proportion of the students surveyed have a job?
  2. Among students who do over 2 hours of homework, what proportion have a job?
  3. What proportion of the students surveyed have no job and do 1 to 2 hours?
  4. Of students with no job, what proportion do under 1 hour?
  1. 11. Marginal: \(120 \div 300 = 0.40\).
  2. 22. Conditional on the over 2 hours column: \(18 \div 72 = 0.25\).
  3. 33. Joint: \(90 \div 300 = 0.30\).
  4. 44. Conditional on the no-job row: \(36 \div 180 = 0.20\).
Answer: 0.40 (marginal), 0.25 (conditional on a column), 0.30 (joint), 0.20 (conditional on a row).
Worked Example 4 Judge two claims

Careful wording

Decide whether each claim is supported by the data, and give the number that decides it.

  1. “Most students who do under an hour of homework have a job.”
  2. “Most students with a job do under an hour of homework.”
  1. 11. Restrict to the 90 students who do under an hour: 54 have a job, and \(54 \div 90 = 0.60\). 60% is more than half. Supported.
  2. 22. Restrict to the 120 students with a job: 54 do under an hour, and \(54 \div 120 = 0.45\). 45% is less than half. Not supported.
Answer: The first claim is supported (60%) and the second is not (45%). The two claims sound alike but condition on different groups.
Common Mistake 3 · Flipping the condition

“Of students with a job, 45% do under an hour” and “of students who do under an hour, 60% have a job” use the same 54 students but different groups. Before dividing, find the group named after “of,” “among,” or “given,” and use its total.

Common Mistake 4 · Comparing counts instead of conditional relative frequencies

54 students with jobs and 36 without do under an hour. That makes the job group look more likely to skimp on homework, but the groups have different sizes (120 and 180). Compare 45% with 20%, not 54 with 36.

5Quick reference

Question wordingKindFraction
“What proportion of all students have a job and …”Jointcell ÷ grand total
“What proportion of all students have a job?”Marginalrow or column total ÷ grand total
“Of / among / given students with a job, what proportion …”Conditionalcell ÷ that row’s (or column’s) total
“Are the variables associated?”Compare conditional distributionsDo the groups split differently?