Marginal vs conditional distribution

By Jude Wallis · Published

A marginal distribution gives the proportions for one variable across the whole two-way table: row or column totals divided by the grand total. A conditional distribution gives the proportions for one variable within a single category of the other: cells divided by that row or column total.

AP Statistics: Unit 2 (topics 2.1 Tabular and Graphical Representations for the Distributions of Two Categorical Variables, 2.2 Summary Statistics for Two Categorical Variables). In the Fall 2026 AP Statistics course, two-way tables and their graphs are topic 2.1, and marginal and conditional relative frequencies are topic 2.2, Summary Statistics for Two Categorical Variables. Both open Unit 2, which is 15% to 25% of the multiple-choice section. The same comparison of conditional distributions returns in the chi-square tests of topics 3.14 and 3.15.

Marginal vs conditional distribution: the short answer

Both are distributions of one categorical variable taken from a two-way table, and both are sets of proportions that add to 1. They differ in which individuals are included.

  • A marginal distribution includes everyone in the table and ignores the second variable. Its numbers come from the totals in the margins, each divided by the grand total.
  • A conditional distribution includes only the individuals in one category of the second variable. Its numbers come from the cells of one row or one column, each divided by the total of that row or column.

A table has exactly two marginal distributions, one for each variable. It has one conditional distribution for every row and one for every column.

What a marginal distribution is

A marginal distribution is the distribution of one variable alone. To find it, take each row total (or each column total) and divide by the grand total. The name comes from the location of those totals: the right and bottom margins of the table.

Take 250 students classified by grade and by how they get to school.

GradeBusCarWalkTotal
Grade 9501040100
Grade 12309030150
Total8010070250

The marginal distribution of travel method is 80250=0.32\frac{80}{250} = 0.32 bus, 100250=0.40\frac{100}{250} = 0.40 car, and 70250=0.28\frac{70}{250} = 0.28 walk. The marginal distribution of grade is 100250=0.40\frac{100}{250} = 0.40 grade 9 and 150250=0.60\frac{150}{250} = 0.60 grade 12. Every denominator is 250. A single one of these proportions is a marginal probability.

What a conditional distribution is

A conditional distribution is the distribution of one variable within a single category of the other variable. To find it, pick one row (or one column), and divide each cell in it by that row's (or column's) total.

From the same table, the conditional distribution of travel method given grade 9 is 50100=0.50\frac{50}{100} = 0.50 bus, 10100=0.10\frac{10}{100} = 0.10 car, and 40100=0.40\frac{40}{100} = 0.40 walk. Given grade 12 it is 30150=0.20\frac{30}{150} = 0.20 bus, 90150=0.60\frac{90}{150} = 0.60 car, and 30150=0.20\frac{30}{150} = 0.20 walk. Each set adds to 1 within its own grade.

You can condition in the other direction too. Among the 100 students who come by car, the conditional distribution of grade is 10100=0.10\frac{10}{100} = 0.10 grade 9 and 90100=0.90\frac{90}{100} = 0.90 grade 12. A segmented bar chart with one bar per group, each scaled to 100%, is a picture of the conditional distributions.

The differences side by side

FeatureMarginal distributionConditional distribution
DescribesOne variable, everyone in the tableOne variable, within one category of the other
NumeratorsRow totals or column totalsCells in one row or one column
DenominatorGrand totalThat row's or column's total
How many in a tableTwo, one per variableOne per row and one per column
Uses the second variableNoYes, as the condition
Can show associationNoYes, by comparing across groups
Example from the table aboveCar: 100250=0.40\frac{100}{250} = 0.40Car given grade 12: 90150=0.60\frac{90}{150} = 0.60

The marginal and conditional distributions are connected. Each marginal proportion is a weighted average of the matching conditional proportions, weighted by group size. For car travel: 0.40×0.10+0.60×0.60=0.04+0.36=0.400.40 \times 0.10 + 0.60 \times 0.60 = 0.04 + 0.36 = 0.40.

When to use which

Use a marginal distribution when the question is about one variable for the whole group. "What proportion of students come by car" needs only the column totals and the grand total.

Use conditional distributions when the question is about a relationship between the two variables. Two categorical variables are associated when the distribution of one changes across the categories of the other, and the only way to see that is to compare conditional distributions. In the table above, 10% of grade 9 students come by car and 60% of grade 12 students do. Those conditional distributions differ, so grade and travel method are associated in this group.

The marginal distribution cannot answer that question. The marginal figure of 40% by car would be the same if both grades had a 40% car rate, and it would be the same with the split of 10% and 60% seen here. Margins describe each variable separately and carry no information about how the variables go together.

The classic mix-up and how to avoid it

The usual error is dividing by the wrong total, which produces a conditional distribution when a marginal one was asked for, or the reverse. Both kinds add to 1, so the mistake does not announce itself.

Check the denominator. If every proportion was divided by the grand total, the distribution is marginal. If every proportion was divided by the total of a single row or column, it is conditional. A set of proportions with mixed denominators is neither, and it will not add to 1.

The second error is conditioning in the wrong direction. "The distribution of grade among car riders" divides by the 100 car riders and gives 0.10 and 0.90. "The distribution of travel method among grade 12 students" divides by the 150 grade 12 students and gives 0.20, 0.60, and 0.20. The cell of 90 appears in both, as 90100\frac{90}{100} in one and 90150\frac{90}{150} in the other. The group named after "among", "of", or "given" supplies the denominator. More table-reading practice is in how to read a two-way table.

Marginal and conditional distributions from one table

Of 100 grade 9 students, 50 take the bus, 10 come by car, and 40 walk. Of 150 grade 12 students, 30 take the bus, 90 come by car, and 30 walk. Find the marginal distribution of travel method, the conditional distribution of travel method for each grade, and state whether grade and travel method are associated.

  1. Find the column totals: bus 50+30=8050 + 30 = 80, car 10+90=10010 + 90 = 100, walk 40+30=7040 + 30 = 70. Grand total: 100+150=250100 + 150 = 250, and 80+100+70=25080 + 100 + 70 = 250 agrees.

  2. Marginal distribution of travel method, each column total over 250: bus 80250=0.32\frac{80}{250} = 0.32, car 100250=0.40\frac{100}{250} = 0.40, walk 70250=0.28\frac{70}{250} = 0.28. Check: 0.32+0.40+0.28=1.000.32 + 0.40 + 0.28 = 1.00.

  3. Conditional distribution given grade 9, each cell over 100: bus 0.500.50, car 0.100.10, walk 0.400.40. Check: 0.50+0.10+0.40=1.000.50 + 0.10 + 0.40 = 1.00.

  4. Conditional distribution given grade 12, each cell over 150: bus 30150=0.20\frac{30}{150} = 0.20, car 90150=0.60\frac{90}{150} = 0.60, walk 30150=0.20\frac{30}{150} = 0.20. Check: 0.20+0.60+0.20=1.000.20 + 0.60 + 0.20 = 1.00.

  5. Compare the two conditional distributions. Car travel is 0.100.10 in grade 9 and 0.600.60 in grade 12, and bus travel is 0.500.50 against 0.200.20. They are clearly different.

  6. Confirm the link to the marginal distribution. The grades make up 0.400.40 and 0.600.60 of the students, so for bus travel 0.40×0.50+0.60×0.20=0.20+0.12=0.320.40 \times 0.50 + 0.60 \times 0.20 = 0.20 + 0.12 = 0.32, which matches the marginal proportion.

The marginal distribution of travel method is 0.32 bus, 0.40 car, 0.28 walk. The conditional distributions are 0.50, 0.10, 0.40 for grade 9 and 0.20, 0.60, 0.20 for grade 12. Because the conditional distributions differ, grade and travel method are associated in this group.

When every conditional distribution matches the marginal

A course has a morning section of 60 students, of whom 45 pass and 15 fail, and an afternoon section of 140 students, of whom 105 pass and 35 fail. Find the marginal distribution of the result and the conditional distribution of the result for each section. Are section and result associated?

  1. Find the totals: pass 45+105=15045 + 105 = 150, fail 15+35=5015 + 35 = 50, grand total 60+140=20060 + 140 = 200.

  2. Marginal distribution of result: pass 150200=0.75\frac{150}{200} = 0.75, fail 50200=0.25\frac{50}{200} = 0.25.

  3. Conditional distribution given morning: pass 4560=0.75\frac{45}{60} = 0.75, fail 1560=0.25\frac{15}{60} = 0.25.

  4. Conditional distribution given afternoon: pass 105140=0.75\frac{105}{140} = 0.75, fail 35140=0.25\frac{35}{140} = 0.25.

  5. Compare. The two conditional distributions are identical, and each equals the marginal distribution.

The marginal distribution is 0.75 pass and 0.25 fail, and both conditional distributions are also 0.75 pass and 0.25 fail. The distribution of the result does not change from one section to the other, so there is no association between section and result in this group.

Frequently asked questions

How do I know which total to divide by?

For a marginal distribution, divide row totals or column totals by the grand total. For a conditional distribution, divide the cells in one row or one column by that row's or column's own total. The group named after "given" or "among" is the denominator.

Can a marginal distribution show whether two variables are associated?

No. A marginal distribution describes one variable and ignores the other, so very different tables can share the same margins. Association shows up only when you compare conditional distributions across the categories of the other variable.

Do marginal and conditional distributions both add to 1?

Yes. Each marginal distribution adds to 1 across the categories of its variable, and each conditional distribution adds to 1 within its own row or column. That is why adding to 1 cannot tell you which kind you computed.