What a mosaic plot shows

A mosaic plot visualizes the relationship between two categorical variables. Each bar represents one category of the first variable, and segments within the bar show the counts (or proportions) of the second variable.

When segment proportions differ across bars, it suggests a possible association between the variables. If all bars have the same internal proportions, the variables are likely independent.

This tool shows a stacked bar chart (the practical modern form of a mosaic plot) and the full rimescr imes c contingency table for reference.

Input tips

  • Enter categories separated by commas or one per line.
  • Both inputs must have the same number of entries (paired observations).
  • Use the preset examples to explore how the plot works.
  • Press Generate Plot to apply your changes and refresh the chart.
  • Copy contingency table exports the full frequency matrix as tab-separated text.

About Mosaic Plot Generator

A mosaic plot is a graphical method to visualize data from two or more qualitative variables. It is used to determine whether there is a relationship between categorical variables. Each segment's height is proportional to the joint frequency of the categories it represents. Differences in segment proportions across bars show differences in conditional frequencies and suggest possible associations. Mosaic plots are widely used in statistics, data analysis, and data visualization to gain insights from categorical datasets.