Educerie · AP · Statistics
AP Statistics 2.2
Summary Statistics for Two Categorical Variables
How do we describe chance and variation, so that a claim about a population can be backed by numbers?
What you will learn
- Understand that joint, marginal and conditional relative frequencies differ only in the number you divide by
- Know that the wording of a question, such as of those who or given that, sets the denominator
- Understand that conditional distributions that differ are evidence of association
- Know how to justify a claim with conditional percentages in context
You must be able to
- Calculate a conditional relative frequency by row or by column from a two-way table
- Calculate a joint relative frequency and a marginal relative frequency
- Compare conditional percentages for two groups and state the direction of the difference
- Justify a claim with the statistics, in context, without claiming cause
- Explain why P(A given B) and P(B given A) come from the same cell but differ
- Name the group and the variable when stating a percentage
In the exam. Section I multiple choice gives a two-way table and asks for one proportion: a cell over the grand total, a row or column total over the grand total, or a cell over a row or column total. Choosing the right denominator is the whole skill. In Section II, the same table comes with "compare the groups" and "justify your claim". These conditional proportions are also the start of conditional probability (2.6) and of the chi-square tests in Unit 3.
1One table, three kinds of proportion
Example (invented): 400 adults say whether they usually use a phone in the hour before bed, and rate their sleep quality as poor, fair or good.
| Poor | Fair | Good | Total | |
|---|---|---|---|---|
| Phone | 54 | 92 | 64 | 210 |
| No phone | 21 | 78 | 91 | 190 |
| Total | 75 | 170 | 155 | 400 |
Check the totals first: .
Joint. The proportion of all 400 adults who used a phone and rated their sleep as poor:
The words "and" or "both" point to a joint proportion. The joint relative frequencies of every cell add to 1.
Marginal. The proportion of all 400 adults who used a phone, whatever their sleep rating, and the proportion who rated their sleep poor, whatever they did before bed:
These are called marginal because the totals sit in the margin of the table. They are about one variable alone.
Conditional. The words "of those who ...", "among ...", "given that ..." or "for the ... group" tell you the denominator. They name the group you restrict to. Of those who used a phone, what proportion rated sleep as poor?
Of those who rated their sleep as poor, what proportion used a phone?
The same cell, 54, gives three different answers: 0.135, 0.257 and 0.72. The question's wording says which one is wanted.
| Wording | Type | Divide the cell by |
|---|---|---|
| "what proportion of all the adults were both ..." | joint | the grand total (400) |
| "what proportion of all the adults were ..." | marginal | the grand total (400) |
| "of the adults who ..., what proportion ..." | conditional | the total for the group named after "of" |
2The whole conditional distribution
For one group, the conditional relative frequencies add to 1. They are that group's distribution of the other variable. Dividing each row by its own total gives:
| Poor | Fair | Good | Total | |
|---|---|---|---|---|
| Phone | 1 | |||
| No phone | 1 |
Each row is the sleep-rating distribution of one group. These are the numbers that get compared.
3Comparing for association
Compare the two rows, category by category.
- Poor sleep: 25.7% of phone users against 11.1% of non-users.
- Good sleep: 30.5% of phone users against 47.9% of non-users.
- Fair sleep: 43.8% and 41.1%, close to equal.
The two distributions differ, mainly in the poor and good categories. That is evidence of an association between phone use before bed and sleep rating in this sample.
If the rows had been nearly the same, the conclusion would be that the data give no evidence of an association.
A comparison needs a direction and the context. "Phone users were more likely than non-users to rate their sleep as poor" says it. "The numbers are different" does not.
Which way to divide. Pick the variable you are comparing groups of, and divide by its totals. To compare phone users with non-users, divide by the row totals, as above. To compare sleep ratings as groups ("of those who rated poor, how many used a phone?"), divide by column totals. Both are valid conditional distributions, but they answer different questions.
4Justifying a claim
A full justification names the statistics, compares them, and links them to the claim in context.
Worked example. A sleep researcher claims that adults who use a phone before bed are more likely to rate their sleep as poor. Do the data in the table support the claim?
- Yes, for this sample. Of the 210 adults who used a phone, 54 (25.7%) rated their sleep as poor. Of the 190 who did not, 21 (11.1%) did.
- The proportion is more than twice as large for phone users, so the data support the claim that phone use and poor sleep ratings are associated.
- This is a survey in which no one was assigned to use or not use a phone, so it does not show that the phone caused the poor sleep.
A second use: the wrong comparison. Suppose a student writes "more phone users than non-users rated poor (54 against 21), so phones cause poor sleep." The counts are higher partly because there are 210 phone users and 190 non-users. The group sizes are not the same, so the right comparison is of percentages within each group, and cause is not shown.
5Same cell, reversed question
A common slip is to swap the condition. "Of poor sleepers, 72% used a phone" is true here (54 of 75). It does not say that 72% of phone users sleep poorly. That figure is 25.7%.
The notation is read "the probability of A given B". Topic 2.6 builds on exactly this: a conditional probability is a conditional relative frequency, found by dividing by the total for the condition.
Practice questions
30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.