Joint Distributions, Covariance & Correlation

the conditional density

For continuous variables there is a snag: the event X = x has probability zero, so the usual conditional-probability formula divides by zero. Yet it clearly means something to ask how Y is distributed once we know X is essentially some exact value x. The conditional density resolves this by working with densities rather than probabilities.

The definition mirrors the discrete one but with the joint pdf and the marginal pdf: f_{Y|X}(y | x) = f(x, y) / f_X(x), defined wherever the marginal f_X(x) is positive. Geometrically, slice the joint density surface with the vertical plane at X = x; that slice is a curve in y, and dividing by f_X(x) rescales the curve so its area becomes 1 — a legitimate one-variable density for Y. So you take the thin sliver of the joint at x and normalise it.

This is the engine behind continuous Bayesian updating, regression, and conditional expectation: E[Y given X = x] is just the mean of this conditional density. When the conditional density does not change as you move x — when every vertical slice has the same shape — X and Y are independent and the joint factors into the product of marginals.

If (X, Y) is bivariate normal with correlation rho, the conditional density of Y given X = x is again normal, with mean that slides linearly with x (mu_Y + rho (sigma_Y / sigma_X)(x - mu_X)) and a SMALLER, fixed variance sigma_Y^2 (1 - rho^2). Learning X shifts the centre and sharpens the spread.

Conditioning on X both relocates and sharpens the distribution of Y in the bivariate normal case.

f_{Y|X}(y | x) is a density in y for each fixed x, not a probability — its integral over y is 1, but a single value can exceed 1. It is only defined where the marginal f_X(x) > 0.

Also called
conditional pdf條件機率密度函數