Statisticians use two-way tables and segmented bar charts to examine the relationship between two categorical variables.
Two-Way Frequency Tables
Below, the two-way table shows the favorite leisure activities for 50 adults - 20 men and 30 women. Because entries in the table are frequency counts, the table is a frequency table.
Entries in the "Total" row and "Total" column are called marginal frequencies or the marginal distribution. Entries in the body of the table are called joint frequencies.
If we looked only at the marginal frequencies in the Total row, we might conclude that the three activities had roughly equal appeal. Yet, the joint frequencies show a strong preference for dance among women; and little interest in dance among men.
Two-Way Relative Frequency Tables
The table above used frequency counts to describe preferences for leisure activities. Alternatively, we could have used relative frequencies, like percentages or proportions, to describe the same data. When we use relative frequencies in a two-way table, table entries are are called conditional frequencies or the conditional distribution. Here is a version of the leisure-activity table with proportions in the table cells.
Relative Frequency for the Whole Table
Two-way tables can show relative frequencies for the whole table, for rows, or for columns. The table above shows relative frequencies for the whole table. The following table shows relative frequencies (proportions) for rows.
Relative Frequency for Table Rows
And, the next table show relative frequencies (proportions, again) for columns.
Relative Frequency for Table Columns
Each type of relative frequency table makes a different contribution to understanding the relationship between gender and preferences for leisure activities. For example, the "Relative Frequency for Rows" table most clearly shows the probability that each gender will prefer a particular leisure activity. It is easy to see that the probability that a man will prefer dance is 10%; the probability that a woman will prefer dance is 53%; the probability that a man will prefer sports is 50%; and so on.
Segmented Bar Charts
Sometimes, relationships are easier to detect when they are displayed graphically in a segmented bar chart. A segmented bar chart has one bar for each level of a categorical variable. Each bar is divided into "segments", such that the length of each segment indicates proportion or percentage of observations in a second variable.
The segmented bar chart above uses data from the "Relative Frequency for Rows" table that we discussed earlier. It shows that women have an strong preference for dance; while men seldom make dance their first choice. Men are most likely to prefer sports, but the degree of male preference for sports over TV is not great.
Test Your Understanding
A public opinion survey explored the relationship between age and support for increasing the minimum wage. The results are summarized below in a two-way frequency table.
|21 - 40||25||20||5||50|
|41 - 60||20||35||20||75|
In the 21 to 40 age group, what percentage supports increasing the minimum wage?
The correct answer is (D). A total of 50 people in the 21 to 40 age group were surveyed. Of those, 25 were for increasing the minimum wage. Thus, half of the respondents in the 21 to 50 age group (50%) supported increasing the minimum wage.