Joint and Marginal Distributions
A joint distribution describes two random quantities together; marginal distributions describe each one separately.
Draft — not yet reviewed by the site owner.
Prerequisites: Random Variables.
A joint distribution tells us how two random variables behave together. It can answer questions such as “How likely are a long wait and a late arrival on the same trip?” A marginal distribution tells us about either variable alone, after we ignore the other one.
Think of a map
For two continuous variables and , picture a map whose horizontal coordinate is and vertical coordinate is . A joint density gives the amount of probability per unit area near each point. The probability of a region is the volume under the density above that region. The set of points where the density can be positive is its support.
If we want the distribution of alone, we collect all the probability along the vertical direction. This is called marginalizing out :
The bounds must respect the support. If the allowed values depend on , the effective bounds do too.
For discrete variables, replace the map by a table. Each cell is a probability . Add a row or column to get a marginal probability. In the continuous case, we integrate instead of adding.
A triangular example
Suppose the pair has joint density
and zero elsewhere. The triangle has area , so a constant density of 2 gives total probability 1. The density is not a probability at a single point.
At a fixed between 0 and 1, runs from 0 to . Therefore
At a fixed , runs from to 1, giving
Both densities are zero outside their stated intervals. They each integrate to 1. For example, the chance that is below is
What a marginal leaves out
The two marginals do not usually determine the joint distribution. Knowing the distribution of each person’s height and each person’s weight separately does not tell us which heights go with which weights. That pairing is the information in the joint distribution.
If and are independent, the joint density factors as (where densities exist). In the triangular example, independence is impossible: knowing tells us , so learning changes what values of are possible.
For more than two variables the idea is the same, but a marginal may require integrating out several coordinates. The next step is to keep one coordinate fixed and describe the remaining uncertainty with a conditional distribution.
Further reading
- MIT OpenCourseWare, “Joint and marginal distributions”. Another treatment of the same ideas.