Objective
Given a joint distribution, recover what one variable says about another: marginals, conditional densities, conditional means and variances. The centrepiece is the multivariate normal, where conditioning has a closed form that underlies regression, Kalman filters, Gaussian-process models and every "best guess from a noisy signal" interview question.
Joint, marginal, conditional
A joint density assigns probability to regions of the plane. The two operations you need:
- Marginalise (forget a variable) by integrating it out: .
- Condition (fix a variable) by slicing and renormalising: wherever .
Intuition for conditioning: take the vertical slice of the joint density at . Its shape is the conditional distribution; dividing by only rescales it to integrate to 1. Independence is the case where every slice has the same shape, i.e. .
Two identities let you avoid computing distributions you do not need:
The second (the law of total variance) splits uncertainty into "noise left after seeing " plus "variation explained by ".
Always track the support. Most errors in joint-density questions come from integrating over the wrong region, not from the algebra.
Worked example
a uniform point in a triangle
is uniform on the triangle . Find the marginals, the conditional distribution of given , and and both directly and through conditioning.
Show solutionHide solution
The triangle has area , so on it.
Marginals. For fixed , runs over : . For fixed , runs over : .
Conditional. on , so , with and .
Directly. , , so .
By conditioning. and , so . Then
The two routes agree. The conditioning route is usually faster in interviews because the conditional distribution is often something you recognise.
The multivariate normal
The cleanest definition is constructive: is multivariate normal, , if for a vector of i.i.d. standard normals and a matrix with . Equivalently, every linear combination is univariate normal, with
When is invertible the density is
Consequences you should be able to state instantly:
- Marginals of any subset are normal; read off the matching entries of and the sub-block of .
- Affine maps preserve normality: . This is how you simulate one (take as the Cholesky factor) and how you decorrelate one.
- Within a jointly normal vector, zero covariance means independence. This is the property that makes the conditioning formula below work.
- Level sets of the density are ellipsoids ; the quadratic form is the squared Mahalanobis distance and has a distribution.
Conditioning one Gaussian block on another
Partition with
Then is normal with
The conditional covariance is the Schur complement of in .
Derivation in four lines (worth reproducing at a whiteboard). Let and define the residual .
- .
- is an affine map of , hence jointly normal, so zero covariance means is independent of .
- Therefore, given , we have with keeping its unconditional law: mean and covariance .
- Adding gives the stated mean.
The regression reading
- is the matrix of population regression coefficients of on , and the conditional mean is the regression line (plane). In the bivariate case it reduces to slope .
- The conditional mean minimises mean squared error over all functions of . For Gaussians the best predictor happens to be linear, which is why OLS is the right tool there.
- The Schur complement is the residual variance. The fraction explained, for scalar , is the population .
- The conditional covariance does not depend on . A surprising observation shifts your forecast but never makes you more or less certain. This is special to the Gaussian; for fat-tailed joint laws (a multivariate , say) an extreme observation widens the conditional spread.
Practical notes: if is singular, some signals are exact linear combinations of others and a pseudo-inverse gives the same conditional law. Numerically, solve rather than forming the inverse.
Worked example
combining two correlated signals
A standardised return and two standardised signals are jointly normal with mean zero and every pairwise correlation equal to . Today and . Find the conditional distribution of and . How much does the second signal add over the first alone?
Show solutionHide solution
The blocks are , and
Coefficients. .
Conditional mean. .
Conditional variance. .
So and
Value of the second signal. With alone, the residual variance is . Adding lowers it only to , so rises from to , not to , because largely repeats what says. Note too that each coefficient is , smaller than the single-signal slope of : correlated signals share the credit.
Worked example
Brownian motion given its endpoint
is a standard Brownian motion. Find the distribution of given for , and evaluate it for , , .
Show solutionHide solution
is jointly normal with mean zero, , and . The scalar conditioning formula gives
The conditional mean interpolates linearly to the endpoint, and the variance is zero at both ends and largest in the middle: this is the Brownian bridge. With , , : .
The same computation answers the classic " i.i.d. ; given , what is ?": and , so .
How to approach these out loud
- Say whether the vector is jointly normal and why (built from independent normals by linear maps, or stated). If not, fall back to slicing the joint density.
- Write down only the blocks you need: of the target, of target with observed, of the observed.
- Conditional mean = prior mean + (covariance / variance) × surprise. Conditional variance = prior variance − explained part.
- Sanity-check the limits: an observation uncorrelated with the target should leave it unchanged; a perfectly correlated one should pin it down.
Knowledge check
is bivariate normal with mean zero, , and . You observe . What is ?
Knowledge check
and are i.i.d. . What is ?
Knowledge check
X and Y are each standard normal and uncorrelated. Which extra fact is enough to conclude they are independent?
Key takeaways
- Marginalise by integrating out; condition by slicing and renormalising. Get the support right first.
- The laws of total expectation and total variance often replace a full conditional calculation.
- means every linear combination is normal; within it, uncorrelated means independent.
- ; prove it by making the residual uncorrelated with .
- The coefficients are population regression slopes, the Schur complement is residual variance, and for Gaussians the conditional variance does not depend on what you observed.
Practice problems
Finished reading?
Answer the 3 knowledge checks to complete this lesson (0 done).