Relationship
Mosaic plot (contingency table)
Represents contingency-table frequencies through recursively partitioned rectangular areas.
- Plot
- Relationship
- Composition
What it answers
How are categorical variables associated?
- Shape
- Proportionally partitioned tiles
- What it shows
- Unequal combinations and association patterns.
Example
The question
Does the share of repeat buyers differ by sign-up channel?
Customers by sign-up channel and repeat purchase (mosaic plot)
Illustrative data. It belongs to no company.
When to use it
Use it when
Exploring contingency tables and category association.
Avoid it when
Sparse high-dimensional categories or unclear partition order.
How to read it
Read tile area as count/share and inspect departures from a reference model if shown.
Note
Related to Marimekko charts but often used for statistical association.
The data you need
- Layout
- Long table
- Fields
- CategoryA: text; CategoryB: text; Count: nonnegative number
- One row is
- One category combination and its frequency. What is the grain?
- Rules
- Aggregate duplicate combinations. Preserve zero cells and use a positive total.
- Optional
- Raw alternative: one row per observation with both category columns. More factors are possible.
- Preparation
- Build a complete contingency table; calculate joint frequencies and optionally expected counts for the chosen association display.
- Units
- Tile area represents contingency count or grand-total share. Residual shading, if present, is a different statistic.
Worked example
Counts A-Yes 30, A-No 10, B-Yes 20, B-No 40 total 100. Tiles occupy 30%,10%,20%,40%; group composition differs.
| CategoryA | CategoryB | Count |
|---|---|---|
| A | Yes | 30 |
| A | No | 10 |
| B | Yes | 20 |
| B | No | 40 |
