Marginal Distribution vs Conditional Distribution

Both terms below come up in the same part of the course, and students mix them up. Here is each one defined on its own, side by side, so you can see where they part company.

Marginal distribution

Probability

A marginal distribution is the distribution of one variable by itself in a two-way table, built from the row or column totals over the grand total.

A marginal distribution is the full set of proportions for one variable of a two-way table, each one a row total or a column total divided by the grand total. A table of two categorical variables therefore has two marginal distributions, one per variable, and each adds to 1 on its own. One of those proportions on its own is a marginal probability; the marginal distribution is all of them together.

Take 200 students classified by year and by how they travel to school.

ClassDrivesDoes not driveTotal
Senior453580
Not senior3090120
Total75125200

The marginal distribution of class is 80/200=0.4080/200 = 0.40 senior and 120/200=0.60120/200 = 0.60 not senior. The marginal distribution of travel is 75/200=0.37575/200 = 0.375 drives and 125/200=0.625125/200 = 0.625 does not. Every denominator is 200.

"The marginal distribution of travel among seniors is 45/80=0.562545/80 = 0.5625 and 35/80=0.437535/80 = 0.4375." Both numbers are right and they add to 1, which is exactly why the mistake survives unnoticed. The denominator is a row total rather than the grand total, so that is a conditional distribution, travel given senior. If your denominator came off a margin, what you computed was conditional.

Margins cannot tell you whether the two variables are related. The 0.375 who drive would read the same whether seniors drove far more than everyone else or exactly as often. Margins also fail to pin down the table: hold them at 80 and 120 down the side and 75 and 125 across the top, and the senior-and-drives cell can be any whole number from 0 to 75 while reproducing them exactly. Cells always determine margins. Margins run back to the cells only in degenerate cases, such as a row total of 0.

Two-way tables are topic 2.1, and the marginal relative frequencies read off them are topic 2.2, Summary Statistics for Two Categorical Variables.

Full entry for marginal distribution

Conditional distribution

Probability

A conditional distribution is the distribution of one variable within a single row or column of a two-way table, divided by that row or column total.

A conditional distribution is the distribution of one variable inside a single category of the other. Take one row of a two-way table, throw the rest of the table away, and divide each cell in that row by the row total. The proportions add to 1 within that group, and the re-dividing is the whole difference from a marginal distribution, which keeps the grand total underneath. A two-by-two table holds four conditional distributions, one for each row and one for each column.

Use the same 200 students the marginal distribution entry tabulates: of the 80 seniors, 45 drive to school and 35 do not, and of the 120 who are not seniors, 30 drive and 90 do not. Given senior, the conditional distribution of travel is 45/80=0.562545/80 = 0.5625 drives and 35/80=0.437535/80 = 0.4375 does not. Given not senior it is 30/120=0.2530/120 = 0.25 and 90/120=0.7590/120 = 0.75. Conditioning down a column instead starts from the 75 drivers: 45/75=0.6045/75 = 0.60 are seniors and 30/75=0.4030/75 = 0.40 are not.

"56.25 percent of seniors drive, so 56.25 percent of drivers are seniors." Those are two different conditional distributions resting on the same cell of 45. The first divides by the 80 seniors and the second by the 75 drivers, and the second answer is 0.60. With a nonzero cell the two agree only when the two groups are the same size. The words "among", "of the", and "given" point at the denominator, so name the group before dividing.

Comparing conditional distributions across rows is what exposes association, and 0.5625 against 0.25 is a wide gap that no margin could have shown. Were the variables unrelated, each row would reproduce the marginal distribution of travel, 0.375 and 0.625, and the senior-and-drives cell would hold 0.40×0.375×200=300.40 \times 0.375 \times 200 = 30 students instead of 45.

If those 200 are a sample from a larger population, a gap this size is evidence rather than proof, and testing it is the job of the chi-square test for homogeneity or independence, topic 3.14.

Full entry for conditional distribution

Where each one fits in the course