Mosaic plot
Shows a two-way table as tiles whose areas are proportional to the counts, shaded by Pearson residuals so cells with more (blue) or fewer (red) cases than expected stand out.
Menu: Graphs → More charts → Mosaic plot…
When should I use it?
- Explaining which cells drive a significant chi-square.
What are the assumptions?
- Two categorical variables.
How do I run it in StatLab?
- Choose the column and row variables.
How do I read the output?
| Output | Meaning |
|---|---|
| Tiles | Widths = column shares; heights = row shares within the column. |
| Shading | Pearson residual beyond ±2 and ±4. |
Worked example
On the practice survey dataset (File → Sample dataset), this command — which the dialog's Paste button also produces — runs the procedure:
PROC vizMosaic /x=group /color=gender.
Computed by StatLab's validated procedure code when this page was built. The example only illustrates the steps; choose variables that fit your own research question.
What are common mistakes?
- Interpreting shading when expected counts are very small.