ArticleslgStudy

mathematics

Mosaic plot

Mosaic plot is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Mosaic plot rather than just read about it. In short: A mosaic plot, Marimekko chart, Mekko chart, or sometimes percent stacked bar plot, is a graphical visualization of data from two or more qualitative variables. It is the multidimensional extension of spineplots, which graphically display the same information for only one variable.

Mosaic plot — main illustration
Mosaic plot — illustration

Key takeaways

  • Mosaic plot belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Mosaic plot to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Mosaic plot from memory before moving on to harder problems.

Reference excerpt

A mosaic plot, Marimekko chart, Mekko chart, or sometimes percent stacked bar plot, is a graphical visualization of data from two or more qualitative variables. It is the multidimensional extension of spineplots, which graphically display the same information for only one variable. Although the term spineplot was originally used by Hummel to describe univariate graphs, Cox points out that the term has also been broadly applied to displays of two or more variables. The mosaic plot makes it possible to visualise relationships between different categorical variables. For example, independence is shown when the boxes across categories all have the same areas. Mosaic plots were introduced by Hartigan and Kleiner in 1981 and expanded on by Friendly in 1994. Mosaic plots are also called Marimekko or Mekko charts because they resemble some Marimekko prints. As with bar charts and spineplots, the area of the tiles, also known as the bin size, is proportional to the number of observations within that category. Although mosaic plots most commonly show the relative frequency of each combination of values, they can also be used to display the goodness with which a loglinear model fits the data.[1] Mosaic plot construction is described and illustrated in detailed worked example by Jeppson and Hoffman using the ggplot2 package in the R language.

Example An example of mosaic plots uses data from the passengers on the Titanic. There are 2201 observations and 3 variables. The variables are:

the gender of the person (male / female) the class (1st, 2nd and 3rd class, or crew) did this person survive the sinking (yes / no)?

Mosaic plot construction

The categorical variables are first put in order. Then, each variable is assigned to an axis. In the table to the right, sequence and classification is presented for this data set. Another ordering will result in a different mosaic plot, i.e., the order of the variables is significant as for all multivariate plots. At the left edge of the first variable we first plot "Gender," meaning that we divide the data vertically in two blocks: the bottom blocks corresponds to females, while the upper (much larger) one to males. One immediately sees that roughly a quarter of the passengers were female and the remaining three quarters male. One then applies the second variable "Class" to the top edge. The four vertical columns therefore mark the four values of that variable (1st, 2nd, 3rd, and crew). These columns are of variable thickness, because column width indicates the relative proportion of the corresponding value on the population. Crew plainly represents the largest male group, whereas third-class passengers are the largest female group. The number of female crew members is also seen to have been marginal. The last variable ("Survived") is finally applied, this time along the left edge with the result highlighted by shade: dark grey rectangles represent people that did not survive the disaster, light grey ones people that did. Women in the first class are immediately seen to have had the highest survival probability. The survival probability for females is seen to have been higher than that for men (marginalised over all classes). Similarly, a marginalization over gender identifies first-class passengers as most probable to survive. Overall, about 1/3 of all people survived (proportion of light gray areas).

Properties The displayed variables are categorical or ordinal scales. The plot is of at least two variables. There is no upper limit, but too many variables may be confusing in graphic form. The number of observations is not limited, but it is not possible to read from the image, which shows relative proportions. Jeppson and Hoffman have published a modified mosaic plot that shows data density. The areas of the rectangular tiles that are available for a combination of features are proportional to the number of observations that have this combination of features. The tiles can be colored according to the standardized residual from a model of independence, so that cells with excessively large or small deviations from their expected value are shaded, as in a heat map, making it possible to detect possible patterns of association. Unlike, for example, the boxplot or QQ plot, it is not possible for the mosaic plot to plot a confidence interval.

Criticism The mosaic plot has been criticised for making the data hard to perceive and to compare visually, because the values correspond to areas.

See also Heat map Treemap Contingency table

References

Further reading John Hartigan, Beat Kleiner: Mosaics for contingency tables. In: Computer Science and Statistics: Proceedings of the 13th Symposium on the Interface. 1981, S. 268–273. Michael Friendly: A Brief History of the Mosaic Display In: Journal of Computational and Graphical Statistics, 2002, 11, 89–107. [The earliest known mosaic display goes back to Georg von Mayr (1877).]

Illustrations

Mosaic plot: Mosaic plot showing cross-sectional distribution through time of different musical themes in the Guardian's list of "1000 songs to hear before you die".
Mosaic plot showing cross-sectional distribution through time of different musical themes in the Guardian's list of "1000 songs to hear before you die".
Mosaic plot illustration

Worked examples

Example 1 — a first encounter with Mosaic plot

Start with the simplest possible case. Write down what Mosaic plot claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Mosaic plot before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Mosaic plot ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Mosaic plot

In research
Mosaic plot appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Mosaic plot in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Mosaic plot is common in secondary-school and first-year university syllabi. It links to neighbouring topics Statistical charts and diagrams, so understanding it makes those chapters shorter.
In everyday life
Look for Mosaic plot outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Mosaic plot” →

How to study Mosaic plot in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Mosaic plot means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Mosaic plot out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Mosaic plot in simple terms?

A mosaic plot, Marimekko chart, Mekko chart, or sometimes percent stacked bar plot, is a graphical visualization of data from two or more qualitative variables. It is the multidimensional extension of spineplots, which graphically display the same information for only one variable.

Why does Mosaic plot matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Mosaic plot?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Mosaic plot.

Tags

  • Statistical charts and diagrams

Keep exploring