Skip to content
Marlbridge

AP® Statistics · Unit 2 · Topic 2.2

Summary Statistics for Two Categorical Variables: Study Guide (Statistics 2.2)

Learn to calculate joint, marginal and conditional relative frequencies from a two-way table, compare conditional distributions for association, and justify claims in context.

From pictures to numbers

In Topic 2.1 you displayed two categorical variables in a two-way table and in graphs, and judged association by eye. This topic gives you the numbers behind those displays. Every summary statistic here is a relative frequency: a count divided by a total. The only question is which count and which total.

There are three kinds:

  • Joint: one cell as a share of everybody.
  • Marginal: one row total or column total as a share of everybody.
  • Conditional: one cell as a share of a single row or a single column.

The data set used in this guide

A fictional sports centre, Fenwick Leisure, has 400 members. For each member it recorded two categorical variables: membership plan (Monthly or Annual) and main activity (Gym, Swim or Classes).

Plan Gym Swim Classes Total
Monthly 80 32 48 160
Annual 72 96 72 240
Total 152 128 120 400

Check: 160 + 240 = 400 and 152 + 128 + 120 = 400.

Joint relative frequencies

A joint relative frequency is a cell count divided by the grand total. It answers “what proportion of all individuals are in this row category and this column category?”

For Monthly and Gym: 80 ÷ 400 = 0.20. So 20% of all Fenwick members are on the Monthly plan and mainly use the gym.

The full table of joint relative frequencies is:

Plan Gym Swim Classes Total
Monthly 0.20 0.08 0.12 0.40
Annual 0.18 0.24 0.18 0.60
Total 0.38 0.32 0.30 1.00

All six joint relative frequencies add to 1, because every member is in exactly one cell.

Marginal relative frequencies

A marginal relative frequency is a row total or a column total divided by the grand total. These numbers sit in the margins of the table, which is where the name comes from. A marginal relative frequency describes one variable on its own, ignoring the other.

  • Plan: Monthly 160 ÷ 400 = 0.40; Annual 240 ÷ 400 = 0.60.
  • Main activity: Gym 152 ÷ 400 = 0.38; Swim 128 ÷ 400 = 0.32; Classes 120 ÷ 400 = 0.30.

The marginal relative frequencies for one variable form its marginal distribution. They add to 1.

Conditional relative frequencies

A conditional relative frequency restricts attention to one category of one variable, then asks what proportion of that group is in a category of the other variable. The denominator is the total of that row or that column only.

Within a row. Of the 160 Monthly members, 80 mainly use the gym: 80 ÷ 160 = 0.50. “Half of the Monthly members mainly use the gym.”

Within a column. Of the 152 members who mainly use the gym, 80 are Monthly members: 80 ÷ 152 ≈ 0.53. “About 53% of the gym users are on the Monthly plan.”

These two numbers use the same cell (80) but answer different questions, so they have different denominators and different values. The phrase after “of the” tells you which group you are in.

Where the numerator and denominator come from for each kind of relative frequency A two-way table of 400 sports centre members with rows Monthly, Annual and Total and columns Gym, Swim, Classes and Total. The cell Monthly and Gym, 80, has a thick solid border. The Monthly row total, 160, has a thick dashed border. The Gym column total, 152, has a thick dotted border. The grand total, 400, has a double border. Below the table, four calculations use the same border styles: joint relative frequency 80 divided by 400 equals 0.20; marginal relative frequency 160 divided by 400 equals 0.40; conditional relative frequency within Monthly members 80 divided by 160 equals 0.50; conditional relative frequency within Gym users 80 divided by 152 is about 0.53. Gym Swim Classes Total Monthly 80 32 48 160 Annual 72 96 72 240 Total 152 128 120 400 Joint: cell ÷ grand total = 80 ÷ 400 = 0.20 Marginal: row total ÷ grand total = 160 ÷ 400 = 0.40 Conditional, within Monthly: cell ÷ row total = 80 ÷ 160 = 0.50 Conditional, within Gym: cell ÷ column total = 80 ÷ 152 ≈ 0.53 Solid box: the cell. Dashed: its row total. Dotted: its column total. Double: the grand total.
Figure 1. The same cell (80 Monthly gym users) gives four different relative frequencies depending on the denominator. Line styles, not colour, match each total to its calculation.

A useful link: joint = marginal × conditional. For example, 0.40 of members are Monthly, and 0.50 of those mainly use the gym, so 0.40 × 0.50 = 0.20 of all members are Monthly gym users. This matches the joint relative frequency above.

Conditional distributions and association

A conditional distribution is the full set of conditional relative frequencies within one group. For each plan, the conditional distribution of main activity is:

Plan Gym Swim Classes Total
Monthly (n = 160) 0.50 0.20 0.30 1.00
Annual (n = 240) 0.30 0.40 0.30 1.00
All members (n = 400) 0.38 0.32 0.30 1.00
Segmented bar chart of main activity for monthly members, annual members and all members Three bars of height 1 on a relative frequency axis from 0 to 1.0. Each bar is split, from bottom to top, into Gym (solid), Swim (hatched) and Classes (dotted). Monthly members: Gym 0.50, Swim 0.20, Classes 0.30. Annual members: Gym 0.30, Swim 0.40, Classes 0.30. All members: Gym 0.38, Swim 0.32, Classes 0.30. The Classes segment is the same size in every bar, but the Gym and Swim segments differ between monthly and annual members. 0.0 0.2 0.4 0.6 0.8 1.0 0.50 0.20 0.30 Monthly (n = 160) 0.30 0.40 0.30 Annual (n = 240) 0.38 0.32 0.30 All members (n = 400) Membership plan Relative frequency Classes Swim Gym
Figure 2. Conditional distributions of main activity for each plan, and the marginal distribution for all 400 fictional Fenwick members. Solid: Gym. Hatched: Swim. Dotted: Classes. The Gym and Swim segments differ between plans, which shows association.

To look for association, compare the conditional distributions:

  • If they are the same (or nearly the same) in every group, there is no evidence of association. Each would also equal the marginal distribution.
  • If they differ, the variables are associated: knowing a member’s plan changes what you expect about their main activity.

Here the conditional distributions differ. Monthly members are more likely to mainly use the gym (0.50 against 0.30), and Annual members are twice as likely to mainly swim (0.40 against 0.20). The proportion for Classes is the same (0.30) in both plans. Association does not need every category to differ; one or more clear differences are enough. So plan and main activity are associated for these 400 members.

You can also condition the other way: compare the plan distribution for Gym, Swim and Classes users. Monthly members are 0.53 of Gym users, 0.25 of Swim users (32 ÷ 128) and 0.40 of Classes users (48 ÷ 120). Those also differ, and they lead to the same conclusion. When one variable is clearly explanatory, condition on it: here, compare activities within each plan.

Justifying a claim with summary statistics

A strong justification:

  1. Names the right relative frequency for the claim, with the correct denominator.
  2. Quotes the values and compares them with words such as “greater than”, “twice” or “about the same as”.
  3. Answers in context and stays within what the data show. These are fictional observational data, so they show association, not cause. A difference between sample proportions may also be partly due to chance; later in the course you will meet a formal test for this.

Worked example 1: choosing the denominator

Question. A fictional town council surveyed 250 residents about a planned cycle lane. Of the 90 residents who live near the planned route, 63 support it and 27 oppose it. Of the 160 residents who do not live near the route, 64 support it and 96 oppose it. Find and interpret: (a) the proportion of all residents who live near the route and support the lane; (b) the proportion of all residents who support the lane; (c) the proportion of residents near the route who support the lane; (d) the proportion of supporters who live near the route.

Step 1: build the table.

Opinion Near the route Not near Total
Support 63 64 127
Oppose 27 96 123
Total 90 160 250

(a) Joint. “Of all residents … near and support”: 63 ÷ 250 = 0.252. About 25% of the residents surveyed live near the route and support the lane.

(b) Marginal. “Of all residents … support”: 127 ÷ 250 = 0.508. Just over half (50.8%) of the residents surveyed support the lane.

(c) Conditional, within the near-route group. “Of residents near the route”: denominator 90. 63 ÷ 90 = 0.70. 70% of residents who live near the route support the lane.

(d) Conditional, within supporters. “Of supporters”: denominator 127. 63 ÷ 127 ≈ 0.496. About half (49.6%) of the supporters live near the route.

Check. (c) and (d) use the same cell, 63, but different groups. Swapping them is the most common error in this topic. Also, the support rate is 0.70 near the route against 64 ÷ 160 = 0.40 elsewhere, so in these data opinion is associated with where people live.

Worked example 2: judging four claims

Question. A fictional supermarket chain recorded whether 600 shoppers used self-checkout at three branches.

Self-checkout Northgate Riverside Hilltop Total
Used 150 120 45 315
Did not use 100 80 105 285
Total 250 200 150 600

Decide whether each claim is supported.

  • Claim A: “Self-checkout is more popular at Northgate than at Riverside, because more Northgate shoppers used it.”
  • Claim B: “Branch and self-checkout use are associated.”
  • Claim C: “Most self-checkout users shopped at Northgate.”
  • Claim D: “Hilltop shoppers avoid self-checkout because they are older.”

Step 1: conditional relative frequencies within each branch. Northgate 150 ÷ 250 = 0.60. Riverside 120 ÷ 200 = 0.60. Hilltop 45 ÷ 150 = 0.30.

Claim A: not supported. 150 is more than 120 only because Northgate had more shoppers. The proportion is the same, 0.60, at both branches.

Claim B: supported. The conditional distributions are not all the same. Hilltop’s rate (0.30) is half of the rate at the other two branches (0.60). Knowing the branch changes how likely a shopper was to use self-checkout.

Claim C: not supported. This needs a conditional relative frequency within the users: 150 ÷ 315 ≈ 0.476. Northgate has the largest share of users, but 0.476 is less than 0.50, so it is not “most”. (The marginal relative frequency of Northgate shoppers is 250 ÷ 600 ≈ 0.417, so Northgate’s share of users is a little above its share of all shoppers.)

Claim D: not supported by these data. The table has no information about age. The difference could have many explanations, such as the number of self-checkout machines at each branch. These are observational data, so they cannot show what causes the lower rate at Hilltop.

Check. All three branch proportions use the branch totals as denominators; Claim C is the only one that conditions on the other variable.

Common misconceptions

  • Swapping the direction of a conditional. “Of supporters, the proportion near the route” (0.496) is not “of residents near the route, the proportion who support” (0.70). Find the group named after “of the” or “among”.
  • Using the grand total for every proportion. Only joint and marginal relative frequencies use the grand total. Conditional ones use a row or column total.
  • Comparing joint relative frequencies to judge association. Joint values depend on group sizes. Compare conditional distributions instead.
  • “No association means equal counts.” It means equal conditional proportions. Groups of different sizes will have different counts even with no association.
  • “Every category must differ for there to be association.” One clear difference in the conditional distributions is enough.
  • “Largest share” = “most”. “Most” needs a proportion greater than 0.50.
  • Concluding cause from observational data. Association can come from confounding variables.

Where this leads

Conditional relative frequencies lead straight into probability. Next, Topic 2.3 estimates probabilities from simulations: see the Topic 2.3 study guide. Later in this unit, conditional probability uses the same “restrict to one group” idea as this topic. Try the practice questions now, then use the revision notes and the checklist to consolidate. For the tables and graphs behind these numbers, go back to the Topic 2.1 study guide.

Quick questions

How do I know which total to divide by?

Find the group the question restricts you to. Words such as "of the", "among", "for those who" or "given that" name that group, and its total is the denominator. If no group is named and the question asks about all individuals, divide by the grand total.

Is a conditional relative frequency the same as a probability?

It is a proportion of the individuals in the data. Later in this unit you will meet conditional probability, which uses the same idea: restrict to one group, then find a proportion within it.

AP® and Advanced Placement® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website. Marlbridge is an independent tuition provider. It is not an authorized AP course provider, an AP school or an exam centre, and these resources are not official College Board materials. Reading them or doing simulations does not meet the laboratory requirement of an AP science course.