Wiki Page, Math 13 - Perez Sandbox : Module 10 - Two-Way Tables (3 of 5)

Wiki Page
2026-01-17T21:15:08-08:00

Exploring the Relationship Between Two Categorical Variables

Exploring the relationship between two categorical variables (in this case, Body Image and Gender) amounts to comparing the distributions of the response variable (in this case, Body Image) for different values of the explanatory variable (in this case, Gender).

EXAMPLE Is body image related to gender?

For each Body Image category, we compare females and males, so we need to know the total numbers of females and males. We no longer need to know the total number of students for each body image category, so we removed these totals from the table.

Two-way table for body perception

| about right | overweight | underweight | Row Totals
female | 560 | 163 | 37 | 760
male | 295 | 72 | 73 | 440

Note that there are many more females than males in this sample, so when we compare females to males, it is misleading to compare raw counts in each Body Image category. For example, it is misleading to say, "Five-hundred sixty females responded 'about right' compared to only 295 males," because the sample includes a lot more females than males. Instead, we compare the percentage of females who responded "about right" to the percentage of males who responded "about right":

Of the 760 females, 560 responded “about right”: 560 760 = 0.737 = 73.7%

Of the 440 males, 295 responded “about right”: 295 440 = 0.67 = 67%

We can interpret percentages as “a number out of 100,” so by converting to percentages, we are reporting the results as though there are 100 females and 100 males. We can see that a higher percentage of females feel “about right” about their body weight.

Note: It is important to identify the explanatory variable because we always use the totals for the explanatory variable to calculate the percentages.

We call these conditional percentages. The percentages in the Female row are the distribution of Body Image based on the condition that students are female. The percentages the Male row are the distribution of Body Image based on the condition that students are male. Thus, our two sets of conditional percentages form two conditional distributions for Body Image.

Body perception with conditional percentages

| About Right | Overweight | Underweight | Row Totals
Female | 560/760 = 73.7% | 163/760 = 21.4% | 37/760 = 4.9% | 760/760 = 100%
Male | 295/440 = 67% | 72/440 = 16.4% | 73/440 = 16.6% | 440/440 = 100%

Here is a side-by-side display comparing the conditional Body Image distributions for females and males.

Let’s Summarize

The relationship between two categorical variables is summarized using a two-way table and conditional percentages. For each value of the explanatory variable, we calculate conditional percentages to show the distribution of the response variable. In particular, we look at how the pattern of conditional percentages differs for different values of the explanatory variable.