Mosaic plot

By Jude Wallis · Updated

A mosaic plot shows two categorical variables as tiles, with bar widths scaled by group size and segment heights giving conditional proportions.

A mosaic plot is a segmented bar chart drawn to 100 percent with one extra rule: each bar's width is proportional to that group's share of all the observations. So a height inside a bar is a conditional proportion, a width across bars is a marginal proportion, and their product, the area of a tile, is that cell's share of the entire table.

Take 250 patients treated at two clinics, 150 at clinic A and 100 at clinic B, of whom 90 and 70 improved. The bar widths are 150/250=0.60150 / 250 = 0.60 and 100/250=0.40100 / 250 = 0.40. The improved segments have heights 90/150=0.6090 / 150 = 0.60 and 70/100=0.7070 / 100 = 0.70. The tile areas are therefore 0.60×0.60=0.360.60 \times 0.60 = 0.36 and 0.40×0.70=0.280.40 \times 0.70 = 0.28, which are exactly 90/25090 / 250 and 70/25070 / 250.

That gap between height and area is where the reading goes wrong: "clinic B's improved tile is taller, so more patients improved at B." Taller means a higher rate, 70 percent against 60 percent, and that much is right. It does not mean more patients. B's improved tile has area 0.28 against A's 0.36, which is 70 improved patients against 90. Height answers what share of this group, area answers what share of everybody, and those two questions have opposite answers here.

The widths are both the reason to use a mosaic plot and its cost. A small group gets a narrow bar, so its segment boundaries are hardest to read precisely when its rate is the interesting one, and with several categories on each variable the tiles shrink until labels no longer fit.

Topic 2.1 of the Fall 2026 course names mosaic plots alongside two-way tables and segmented bar charts for displaying two categorical variables.

Where this comes up

More graphs and displays terms, or browse the full statistics glossary.