AP* Statistics Tutorial: Two-Way Tables
A common task in statistics is to look for a relationship between two
categorical
variables.
Two-Way Tables
A two-way table (also called a contingency table)
is a useful tool for examining relationships between
categorical variables. The entries in the cells of a two-way
table can be
frequency
counts or
relative
frequencies (just like a
one-way
table).
Two-Way Frequency Tables
|
Dance |
Sports |
TV |
Total |
| Men |
2 |
10 |
8 |
20 |
| Women |
16 |
6 |
8 |
30 |
| Total |
18 |
16 |
16 |
50 |
To the right, 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
|
Dance |
Sports |
TV |
Total |
| Men |
0.04 |
0.20 |
0.16 |
0.40 |
| Women |
0.32 |
0.12 |
0.16 |
0.60 |
| Total |
0.36 |
0.32 |
0.32 |
1.00 |
Relative Frequency of Table
We can also display relative frequencies in two-way tables.
The table to the right shows preferences for leisure activities
in the form of relative frequencies. The relative
frequencies in the body of the table are called
conditional frequencies or the
conditional distribution.
Two-way tables can show relative frequencies for the
whole table, for rows, or for columns. The table to the
right shows relative frequencies for the whole table.
Below, the table on the left shows relative frequencies for rows; and
the table on the right shows relative frequencies for columns.
|
Dance |
Sports |
TV |
Total |
| Men |
0.10 |
0.50 |
0.40 |
1.00 |
| Women |
0.53 |
0.20 |
0.27 |
1.00 |
| Total |
0.36 |
0.32 |
0.32 |
1.00 |
Relative Frequency of Row
|
|
|
Dance |
Sports |
TV |
Total |
| Men |
0.11 |
0.62 |
0.50 |
0.40 |
| Women |
0.89 |
0.38 |
0.50 |
0.60 |
| Total |
1.00 |
1.00 |
1.00 |
1.00 |
Relative Frequency of Column
|
Each type of relative frequency table makes a different contribution to
understanding the relationship between gender and preferences for
leisure activities. For example, "Relative Frequency for Rows"
table most clearly shows the probability that each gender will
prefer a particular leisure activity. For instance, 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.
Such relationships are often 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 on the right uses data from the
"Relative Frequency for Rows" table above. 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 preference for sports over TV is not great.
Test Your Understanding of This Lesson
Problem
|
For |
Against |
No opinion |
Total |
| 21 - 40 |
25 |
20 |
5 |
50 |
| 41 - 60 |
20 |
35 |
20 |
75 |
| Over 60 |
55 |
15 |
5 |
75 |
| Total |
100 |
70 |
30 |
200 |
Frequency Count
A public opinion survey explored the relationship between age
and support for increasing the minimum wage. The results are
summarized in the two-way table to the right.
In the 21 to 40 age group, what percentage supports increasing
the minimum wage?
(A) 12.5%
(B) 20%
(C) 25%
(D) 50%
(E) 75%
Solution
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.
|