Marginal counts

Although our main interest is usually on the relationship between two categorical variables, it can also be of interest to examine the overall distribution of each variable separately. These are called the marginal distributions of the two variables and are determined by the row and column totals of the contingency table.

    Variable X
Variable Y       X1       X2       X3       X4     Total 
  Y1 002 003 057 06 68
Y2 052 170 163 17 402
Y3 156 125 061 06 348
Y4 220 083 039 04 346
Total 430 381 320 33

The row and column totals correspond to the heights of the stacks in stacked bar charts. For example, the above row totals are the heights of the stacks in the following diagram.

 

and