Skip to main content icon/video/no-internet

Mosaic plots were introduced by Hartigan and Kleiner as a means of visualizing contingency tables. As the name suggests, mosaic plots are pieced together from smaller rectangular tiles. Each tile corresponds to one cell of a contingency table. Its area is proportional to the size of the cell, and shape and location are determined during the construction process. We will explain the construction process using data from the Titanic (see Table 1 for the numbers). In this data set, age, gender, and passenger information is available for all 2,201 persons on board the MS Titanic on her fatal maiden voyage. Additionally, survival information is recorded for each person. We start with a single variable: Figure 1 shows a bar chart of Survival. The bars are colored according to the outcome. On the right, a spineplot is drawn. Spineplots are variations of bar charts, where the width instead of the height of each bar is proportional to the number of cases.

Additionally, the coloring shows survival within class. We can see that survival rates go down from left to right, that is, first class passengers had the highest rate of survival (about 62%), whereas third class passengers and crew members had the lowest survival rate (about 24%). The spineplot of Figure 1 is an example of a one-dimensional mosaic plot. Mosaic plots can show many variables and are limited only by practical issues, such as screen space and interpretability.

To make the mosaic of Figure 1 two-dimensional, we can include the information on age (classified as adult or child) and draw two separate mosaic plots on top of each other, as shown in Figure 2.

The top row in this mosaic plot shows survival rates of children within the classes. It becomes apparent that there were no children in the crew—obviously a structural zero. There also were no deaths in the first two passenger classes. We can now incorporate gender in the mosaic plot by placing the mosaic of Figure 2 for each gender separately side by side, as is shown in Figure 3.

Table 1 Titanic Data Set
ChildAdult
SexSurvived1st2nd3rdCrew1st2nd3rdCrewTotal
MaleNo003501181543876701364
Yes511130571475192367
FemaleNo00170413893126
Yes113140140807620344
Total6247903192616278852201

Figure 1 Bar Chart and Spineplot

None
Survival rates by class, age, and gender are shown. Overall, a lot more men were on board than women. Survival rates for women are significantly higher than for men. The pattern within class also looks different for women than for men. Women have a strong class/survival association: With higher class, survival improves dramatically. This is not true for men. Survival rates of men in the second passenger class are curiously low and have led to many speculations.

Figure 2 Mosaic Plot of Class and Age

None

Figure 3 Mosaic Plot of Class, Age, and Gender (Sex Variable)

None

The construction of mosaic plots is strictly hierarchical, which emphasizes the order of variables. Figure 4 shows the same data as the mosaic in Figure 3 with different order of the variables. The variables of class and gender are exchanged. This enables us to better compare the differences in survival rates between female and male persons on board.

...

  • Loading...
locked icon

Sign in to access this content

Get a 30 day FREE TRIAL

  • Watch videos from a variety of sources bringing classroom topics to life
  • Read modern, diverse business cases
  • Explore hundreds of books and reference titles

Sage Recommends

We found other relevant content for you on other Sage platforms.

Loading