Proportions within groups

Although a contingency table fully describes categorical data from two or more groups, it is a poor way to compare the distributions if there are different total numbers in the groups.

Rather than tabulating the frequencies for each group, it is more informative to tabulate the proportions within the groups. Each frequency in the table is therefore divided by the total for that group.

For example, in the health and contraception data on the previous page,

However since there were many more in the 30-39 age group, it is more meaningful to report that

Blood type and race

In a study of racial differences in blood types, blood specimens from the Blood Bank of Hawaii were classified by blood type (O, A, B and AB) and by ethnic group (Hawaiian, Hawaiian-white, Hawaiian-Chinese and White). The contingency table below describes the data.

Differences between the ethnic groups are clearer if the proportions of each blood type are displayed within each ethnic group. These proportions are found by dividing each row of the table by its row total — click on any row to see the process.

Select the option Propn within Ethnic group from the pop-up menu to display the resulting proportions. This scales each row, making all row totals the same, 1.0.

Observe that a larger proportion of Hawaiian-chinese and Whites have blood types B and AB than the other ethnic groups.

Multiplying the proportions by 100 rewrites them as percentages. Select Percent within Ethnic group to display these percentages. Although percentages and proportions contain the same information, the leading zeros and decimal points are absent in the percentages and this 'cleaner' display makes it easier to compare the ethnic groups.

Bar charts of proportions

Bar charts provide a graphical way to compare groups. Although the bar chart of each group has the same shape whether it is based on frequencies or proportions, comparisons are made more easily if proportions are used, especially when the groups are of different sizes.

Doplhin Activity

Groups of dolphins were observed off the coast of Iceland near Keflavik in 1998. The data here give the time of the day and the main activity of the group, whether travelling quickly, feeding or socializing. The diagram below shows the number of groups observed at each time of day, categorised by activity type.

From bar charts of the counts, various differences in activity between the times are evident. In particular, few groups are feeding in the afternoon and most are feeding in the evening. But it is harder to assess whether a larger proportion are feeding in the morning or at noon.

Select Propn within Time of day or Percent within Time of day from the pop-up menu. The effect is to scale each bar chart to have the same total (1.0 or 100). It can now be seen that a larger proportion of groups are feeding in the morning than at noon.

Clustering the bars

If the groups correspond to different rows of a table that shows proportions within groups (so the row totals are 1.0), the most important comparisons are down columns. For example, we would scan down the 'AB' column in the blood-type table to compare the proportions with 'AB' blood in the different ethnic groups.

When separate bar charts are drawn for the different groups, the corresponding bars are widely separated in the diagram, making comparisons harder. An alternative display uses the same bars, but clusters them by the values of the categorical variable, rather than by groups. This type of clustered bar chart makes it easier to spot subtle differences between the groups.

Blood type and race

The diagram below shows bar charts of the proportions of different blood types in Hawaii in four ethnic groups.

Comparing the proportions with any particular blood group between the ethnic groups is difficult because their bars are separated.

Select the option Blood type from the pop-up menu to cluster the bars by blood type. Observe the greatest difference between the ethnic groups is in blood type B, though there are also noticeable differences in blood types A and AB.