Joint & Marginal Distributions

Joint pmf tables, marginals by summing, and the independence test.

The idea

The joint distribution of two random variables records how they behave together, which their separate behaviours do not determine. For discrete $X$ and $Y$, the joint probability mass function assigns a probability to every pair of values: $p(x, y) = \mathbb{P}(X = x,\, Y = y).$ When each variable takes only a few values, we lay $p$ out as a table, one row per value of $X$ and one column per value of $Y$. The entries are nonnegative, and since exactly one pair occurs on each run, they sum to $1$.

The joint distribution contains each variable's behaviour alone. The events $\{X = x,\, Y = y\}$ for the different values of $y$ are disjoint and together make up the event $\{X = x\}$, so their probabilities add: $p_{X}(x) = \sum_{y} p(x, y).$ This marginal mass function of $X$ is a row sum of the table, and the column sums give $p_{Y}$. The name records where such totals were once written: in the margin beside the table.

The passage runs one way only. The joint determines the marginals, but the marginals do not determine the joint: many different tables share the same row and column totals.

Ways to work on it

Not sure where to start? Take the ten-question placement test.