Short on time? This page is the recap. For explanations and worked examples, use the full study guide.
Recap
- A two-way (contingency) table shows two categorical variables for the same individuals. Rows are the categories of one variable, columns the categories of the other.
- Each cell counts individuals in that row category and that column category. Row totals, column totals and the grand total sit at the edges.
- Cells can hold counts or relative frequencies (proportions).
- To compare groups, find the distribution of the response within each group: cell ÷ group total.
- Two variables are associated if the distribution of one changes across the categories of the other.
Key relationships
| Display | What you see | Best for |
|---|---|---|
| Two-way table | Exact counts and totals | Starting point for every calculation |
| Side-by-side bar chart | One cluster of bars per group, one bar per response category | Comparing categories; use proportions if group sizes differ |
| Segmented bar chart | One bar of height 1 per group, split into within-group proportions | Seeing at a glance whether distributions differ |
| Mosaic plot | Segmented bars whose widths show group sizes | Group sizes, within-group distributions and cell counts (areas) together |
| Mosaic rectangle | width × height = share of all individuals in that cell | Getting counts back: width × height × grand total |
Assumptions and conventions
- Each individual is in exactly one category of each variable, so each group’s proportions add to 1.
- Put the explanatory variable on the axis (one bar per group) and split by the response variable.
- Stack segments in the same order in every bar, and use patterns or labels, not colour alone.
- Small differences between sample proportions can happen by chance; describe their size.
Mistakes to avoid
- Comparing counts between groups of different sizes.
- Reading group sizes from a segmented bar chart. Every bar is height 1.
- Ignoring column widths in a mosaic plot. Width tells you group size.
- Mixing up directions. “Proportion of App users who are under 30” is not “proportion of under-30s who use the App”.
- Claiming cause from a survey or other observational study.
- Totals that do not add up. Check rows and columns against the grand total first.
Quick self-check
- Group A: 40 of 50 said Yes. Group B: 60 of 100 said Yes. Which group was more likely to say Yes? (A: 0.80 against 0.60, even though B has more Yes answers)
- In a mosaic plot of 600 people, a column has width 0.30 and a segment in it has height 0.50. How many people are in that cell? (0.30 × 0.50 × 600 = 90)
- Both bars of a segmented bar chart have their dividing line at 0.45. What does this suggest? (No association: the response distribution is the same in both groups)
Next: practice questions.