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.
| Grade | Bus | Car | Walk | Total |
|---|---|---|---|---|
| Grade 9 | 50 | 10 | 40 | 100 |
| Grade 12 | 30 | 90 | 30 | 150 |
| Total | 80 | 100 | 70 | 250 |
The marginal distribution of travel method is bus, car, and walk. The marginal distribution of grade is grade 9 and 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 bus, car, and walk. Given grade 12 it is bus, car, and 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 grade 9 and 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
| Feature | Marginal distribution | Conditional distribution |
|---|---|---|
| Describes | One variable, everyone in the table | One variable, within one category of the other |
| Numerators | Row totals or column totals | Cells in one row or one column |
| Denominator | Grand total | That row's or column's total |
| How many in a table | Two, one per variable | One per row and one per column |
| Uses the second variable | No | Yes, as the condition |
| Can show association | No | Yes, by comparing across groups |
| Example from the table above | Car: | Car given grade 12: |
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: .
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 in one and 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.
Find the column totals: bus , car , walk . Grand total: , and agrees.
Marginal distribution of travel method, each column total over 250: bus , car , walk . Check: .
Conditional distribution given grade 9, each cell over 100: bus , car , walk . Check: .
Conditional distribution given grade 12, each cell over 150: bus , car , walk . Check: .
Compare the two conditional distributions. Car travel is in grade 9 and in grade 12, and bus travel is against . They are clearly different.
Confirm the link to the marginal distribution. The grades make up and of the students, so for bus travel , 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?
Find the totals: pass , fail , grand total .
Marginal distribution of result: pass , fail .
Conditional distribution given morning: pass , fail .
Conditional distribution given afternoon: pass , fail .
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.