Joint, marginal, and conditional distributions in a two-way table
A two-way table lets us answer a few different questions about the same group. We’ll look at the cells, the totals at the edges, and what changes when we look at only one row or column.
Joint distribution: look inside the table
For 100 participants, we have two measurements: average hours of exercise per week and total pounds of weight lost during the study. Each range includes its lower endpoint and stops before the upper one. For example, 0–<2 lb means from zero up to, but not including, two pounds.
| Hours / week | 0–<2 lb | 2–<4 lb | 4–<6 lb | 6+ lb | Total |
|---|---|---|---|---|---|
| 0–<3 | 4% | 2% | 2% | 1% | 9% |
| 3–<6 | 8% | 6% | 5% | 0% | 19% |
| 6–<9 | 1% | 17% | 10% | 4% | 32% |
| 9–<12 | 3% | 3% | 12% | 9% | 27% |
| 12+ | 2% | 3% | 4% | 4% | 13% |
| Total | 18% | 31% | 33% | 18% | 100% |
Each inside cell tells us the share of the whole group that meets both conditions. For instance, 17 of the 100 participants exercised at least 6 but fewer than 9 hours per week and lost at least 2 but fewer than 4 pounds. That cell is 17%.
Marginal distribution: read one set of totals
The margins show what happens when we look at just one of the variables. The Total column gives the exercise distribution. For example, 32% of the group exercised at least 6 but fewer than 9 hours per week, counting everyone in that row. The Total row gives the weight-loss distribution. For example, 18% lost less than 2 pounds, counting everyone in that column.
Conditional distribution: divide by the total for your group
Suppose we want the distribution of weight loss among people who exercised fewer than 3 hours per week. There are people in that row. Of those, lost less than pounds, so the conditional percentage is
For the other three weight-loss categories, divide , , and by to get about , , and . The exact fractions sum to ; the rounded percentages can add up to slightly less or more than .
Reverse the condition and the denominator changes
Now look only at the people who lost less than pounds. The first column contains people. The same people also exercised fewer than hours per week, but this time the question gives us a different group.
The numerator is the same in both examples. The phrase after “given that” tells us whether to divide by the row total or the column total.