Tutorials › Introduction to Statistics › Comparing Conditional Distributions

Two-Way Tables and Association · Tutorial 207 of 996

Comparing Conditional Distributions

Compare groups fairly by calculating conditional percentages with a consistent denominator and identifying which outcome categories differ most.

Beginner 9 min read

What You'll Learn

  • Identify which variable defines the groups and which variable supplies the outcome categories.
  • Choose row or column percentages according to where the groups appear in a two-way table.
  • Calculate each conditional percentage using the total for its group as the denominator.
  • Compare category percentages across groups in percentage points.
  • Describe the largest differences with both the groups and outcome categories named.
  • Recognize why raw counts and inconsistent denominators can mislead a comparison.

Why Compare Conditional Distributions?

A two-way table organizes counts for two categorical variables. To compare groups, it is usually not enough to compare the counts in the table: groups may have different sizes, so a larger count can simply reflect that more individuals are in that group. Conditional distributions put the groups on a common percentage scale by showing how individuals within each group are distributed across the categories of the other variable.

For example, suppose a hypothetical survey records whether students used a particular study resource and whether they passed an assessment. The question “How did outcomes differ between students who used the resource and those who did not?” asks us to compare the outcome percentages within each resource-use group. The relevant denominator for each percentage is that group’s total, not the total number surveyed.

Definition: A conditional distribution gives the percentages in the categories of one variable within a specified category, or group, of another variable. To compare conditional distributions, calculate the same set of category percentages for every group, using each group’s total as its denominator, and describe how those percentages differ.

Set the Comparison Before Calculating

A clear comparison starts by naming two roles. First, identify the grouping variable: its categories define the groups you want to compare. Second, identify the outcome variable: its categories are the parts of each group’s distribution. These are roles in the question, not fixed properties of the table. The question determines which variable should define the groups.

Then use a consistent denominator. If the groups are in the rows, find the row percentages; if the groups are in the columns, find the column percentages. In either case, each group’s percentages should total 100%, apart from small rounding differences. When reporting a comparison, name both the outcome category and the groups being compared. “The percentages differ” is not enough to tell a reader what the table shows.

Worked Example: Comparing Outcomes Across Study Groups

In a hypothetical class activity, students are grouped by whether they used a practice guide. The table records assessment outcomes. Compare the outcome distributions for the two groups.

Practice-guide groupPassedDid not passTotal
Used guide421860
Did not use guide303060
Total7248120

The question compares outcomes across practice-guide groups, so the groups are the rows. Calculate percentages within each row. For students who used the guide, the percentage who passed is

$$ \frac{42}{60}\times 100\%=70\%. $$

The percentage who did not pass in that group is

$$ \frac{18}{60}\times 100\%=30\%. $$

For students who did not use the guide, the corresponding percentages are

$$ \frac{30}{60}\times 100\%=50\% \qquad\text{and}\qquad \frac{30}{60}\times 100\%=50\%. $$

The conditional distributions are therefore 70% passed and 30% did not pass among guide users, compared with 50% passed and 50% did not pass among nonusers. The largest difference is for passing: 70% versus 50%, a difference of 20 percentage points. The non-passing percentages also differ by 20 percentage points, in the opposite direction. This is a description of the hypothetical groups in the table; it does not establish that using the guide caused the difference.

Row or Column Percentages?

The layout of a table helps determine how to calculate, but the question determines which conditional distribution is useful. When the groups are rows, each row is a group and its row total is the denominator. When the groups are columns, each column is a group and its column total is the denominator. This is the same idea in either orientation: compare percentages within each group.

A quick check is to ask, “Which individuals belong in the denominator for this percentage?” If the question is how travel preferences vary across campus locations, the denominator for a preference percentage is the number of people at that location. If the question instead is how campus locations vary among people with a particular preference, the denominator would be the total number of people in that preference category. Those are different questions, so they produce different conditional distributions.

Worked Example: Comparing Preferences Across Locations

A hypothetical survey records the usual travel mode for people at two campus locations. Here, location is the grouping variable and travel mode is the outcome variable. The locations are the columns, so calculate column percentages.

Travel modeUrban locationSuburban location
Bus3618
Car2442
Walk2020
Total8080

At the urban location, the bus percentage is \(36/80\times100\%=45\%\), the car percentage is \(24/80\times100\%=30\%\), and the walking percentage is \(20/80\times100\%=25\%\). These add to 100%.

At the suburban location, the bus percentage is \(18/80\times100\%=22.5\%\), the car percentage is \(42/80\times100\%=52.5\%\), and the walking percentage is \(20/80\times100\%=25\%\). These also add to 100%.

The largest differences are for bus and car: bus use is 45% at the urban location and 22.5% at the suburban location, while car use is 30% and 52.5%, respectively. Each gap is 22.5 percentage points. The walking percentages are the same, at 25% in both groups. A contextual summary is: “The urban group had a higher percentage who usually traveled by bus, while the suburban group had a higher percentage who usually traveled by car; the walking percentages matched.”

The raw bus counts, 36 and 18, do not by themselves give a fair comparison of how common bus travel is at each location. The calculations use the location totals, which are the appropriate denominators for the question.

How to Find and Describe the Largest Differences

Once the conditional percentages are calculated, compare like with like: bus with bus, car with car, or pass with pass. For each outcome category, note the percentage in every group. The largest difference is the category whose percentages are farthest apart. Describe it in percentage points, not as a difference in counts.

A percentage-point difference is found by subtracting one percentage from another. For instance, 70% minus 50% is 20 percentage points. This describes the gap between the two percentages. It is not the same as saying the percentage is “20% higher,” which would describe a relative change and requires a different calculation. When the aim is to compare conditional distributions, percentage points make the size of the gap easy to interpret directly.

Justification: Within a group of size \(N\), suppose the outcome categories have counts \(c_1,c_2,\ldots,c_k\). Because every individual in the group belongs to exactly one of these categories, the counts sum to the group total: \(c_1+c_2+\cdots+c_k=N\). The conditional percentage for category \(j\) is \(100c_j/N\). Adding the percentages gives \(100(c_1+c_2+\cdots+c_k)/N=100N/N=100\%\). Thus each group’s conditional percentages describe a complete distribution.

Worked Example: Unequal Group Sizes and the Largest Gap

A hypothetical service survey asks respondents to rate an appointment experience as satisfied, neutral, or dissatisfied. The sample contains different numbers of respondents from two wards. Compare the rating distributions by ward.

WardSatisfiedNeutralDissatisfiedTotal
North288440
South602515100

Ward is the grouping variable, so calculate each rating percentage within its ward. In the North ward, the percentages are

$$ \frac{28}{40}\times100\%=70\%\text{ satisfied},\quad \frac{8}{40}\times100\%=20\%\text{ neutral},\quad \frac{4}{40}\times100\%=10\%\text{ dissatisfied}. $$

In the South ward, they are

$$ \frac{60}{100}\times100\%=60\%\text{ satisfied},\quad \frac{25}{100}\times100\%=25\%\text{ neutral},\quad \frac{15}{100}\times100\%=15\%\text{ dissatisfied}. $$

Compare the same rating category across the two wards. The satisfied percentages differ by \(70\%-60\%=10\) percentage points. The neutral percentages differ by \(25\%-20\%=5\) percentage points, and the dissatisfied percentages differ by \(15\%-10\%=5\) percentage points. Satisfaction therefore has the largest gap: the North ward has a 10-percentage-point higher satisfied percentage. Although the South ward has more satisfied respondents in raw numbers (60 versus 28), it also has more than twice as many respondents overall. The conditional percentages, not those raw counts, answer the question about how the rating distributions compare.

A Practical Comparison Procedure

For a reliable description, keep the calculation and the wording aligned with the question. This short sequence works whether the groups are arranged in rows or columns.

1
Name the groups and outcomes.
Identify the variable that defines the groups and the variable whose categories make up each distribution.
2
Choose the within-group total.
For each percentage, use the total number of individuals in the relevant group as the denominator.
3
Calculate all categories consistently.
Use the same orientation and denominator rule for every group; check that each group’s percentages total about 100%.
4
Compare matching outcomes.
Compare each category across the groups and identify which percentages are farthest apart.
5
Write a contextual summary.
Name the outcome, the groups being compared, and the percentage-point difference when it helps convey the size of the gap.

Common Mistakes

  • Comparing raw counts when group sizes differ. A group with more individuals may have more observations in a category even when that category represents a smaller share of the group. Use within-group percentages to compare distributions.
  • Using the table’s grand total as the denominator. Dividing a cell count by the grand total gives a share of the entire sample, not the percentage within a group. Use the row or column total for the group named in the question.
  • Switching denominators partway through. If one group’s percentages are calculated within rows and another’s within columns, the results do not form comparable conditional distributions. Keep the group definition consistent.
  • Reporting a difference without identifying what differs. “There is a 20-point gap” is incomplete. State the category and both groups, such as “the percentage who passed was 20 percentage points higher among guide users.”
  • Turning a descriptive comparison into a causal claim. A table can describe differences in the recorded groups. It does not, by itself, show why the differences occurred.
Key takeaway: To compare categorical outcomes across groups, calculate the conditional distribution within each group. Use a common denominator rule, compare matching categories, and describe the largest percentage gaps with the groups and outcome named.

Check Your Understanding

Answer each question using the idea of comparing distributions within groups.

  1. A table lists preferred meal type by residence hall, with halls in columns. If the question is how preferences differ by hall, which total should be the denominator for each percentage?
  2. One group has 24 people in a category out of 40, and another has 30 in that category out of 100. Calculate both within-group percentages and state which group has the higher percentage.
  3. In a comparison, one outcome category is 38% in Group A and 26% in Group B. State the difference in percentage points and name the two groups.
  4. Why is it not enough to report that one group has more people in an outcome category than another?
  5. A group’s conditional percentages add to 98% after rounding. Does this necessarily indicate an error? Explain.