Why Gaussian Conditioning Has a Matrix Formula
For jointly Gaussian vectors, conditioning changes the mean in a way that is linear in the observed value, while the conditional covariance does not depend on that value. When the conditioning vector has a nonsingular covariance matrix, the familiar formula uses an ordinary matrix inverse. The same structure persists when that covariance matrix is singular, but the inverse must be replaced by the Moore–Penrose pseudoinverse, and the possible conditioning values lie on a lower-dimensional affine set.
This topic is useful whenever a multivariate normal model includes exact linear constraints, redundant coordinates, or observations with no noise in some directions. The singular case is not a separate exception to Gaussian conditioning: it is the same projection-and-residual calculation, carried out on the subspace where the conditioning vector can vary.
Joint Gaussian Vectors and Covariance Blocks
A random vector \(W\) in \(\mathbb{R}^r\) is Gaussian if every linear combination of its coordinates is a one-dimensional normal random variable, allowing a constant random variable as a degenerate normal. Its mean is denoted by \(\mu_W=\mathbb{E}[W]\), and its covariance matrix is \(\operatorname{Cov}(W)=\mathbb{E}[(W-\mu_W)(W-\mu_W)^{\mathsf T}]\). A Gaussian vector may have a singular covariance matrix.
Let \(X\) take values in \(\mathbb{R}^d\) and \(Y\) in \(\mathbb{R}^k\), and suppose the pair \((X,Y)\) is jointly Gaussian. Write its mean and covariance in blocks:
For a symmetric positive semidefinite matrix \(C\), its Moore–Penrose pseudoinverse \(C^+\) acts as the ordinary inverse on the range of \(C\) and as zero on the null space of \(C\). In particular, \(C^+\) is symmetric, \(C^+CC^+\!=C^+\), and \(C^+C\) is the orthogonal projection onto \(\operatorname{Range}(C)\).
The Conditional Gaussian Formula
When \(C\) is invertible, \(C^+=C^{-1}\), and the theorem reduces to the usual inverse-matrix formula. When \(C\) is singular, the expression still makes sense because the cross-covariance \(B\) is necessarily zero in every direction of \(\operatorname{Null}(C)\). The pseudoinverse therefore inverts only the directions in which \(Y\) actually varies.
Worked Calculations
Worked Example: Scalar Conditioning
Suppose \(Y\sim\mathcal{N}(1,4)\), and let \(X=2Y+\varepsilon\), where \(\varepsilon\sim\mathcal{N}(0,9)\) is independent of \(Y\). The pair \((X,Y)\) is jointly Gaussian. Its means are \(\mu_Y=1\) and \(\mu_X=2\). Its covariance blocks are
The conditional mean and variance are therefore
This agrees directly with the defining relation \(X=2Y+\varepsilon\): once \(Y=y\) is observed, \(X=2y+\varepsilon\), and the independent noise still has mean \(0\) and variance \(9\).
Worked Example: A Two-Dimensional Matrix Calculation
Let \(Y\sim\mathcal{N}(0,I_2)\), let \(E\sim\mathcal{N}(0,\operatorname{diag}(1,4))\) be independent of \(Y\), and set
Here \(\Sigma_{YY}=I_2\) and \(\Sigma_{XY}=M\). Direct multiplication gives
Since \(I_2^+=I_2\), the conditional covariance is
For the observed value \(y=(2,-1)^{\mathsf T}\), the conditional mean is
Thus \(X\mid Y=(2,-1)^{\mathsf T}\) has law \(\mathcal{N}((0,-3)^{\mathsf T},\operatorname{diag}(1,4))\). The calculation also follows from the construction: after observing \(Y=y\), only the independent vector \(E\) remains random.
Worked Example: Conditioning on a Singular Gaussian Vector
Let \(U,V\) be independent standard normal random variables, and define \(Y=(U,2U)^{\mathsf T}\) and \(X=3U+V\). The second coordinate of \(Y\) is always twice the first, so \(Y\) has a singular covariance matrix. The means are zero, and the covariance blocks are
The matrix \(C\) has range spanned by \((1,2)^{\mathsf T}\) and eigenvalue \(5\) on that range. Its pseudoinverse is
Indeed, \(C C^+=C/5\), the projection onto the span of \((1,2)^{\mathsf T}\). The conditional mean coefficient and variance are
Every possible conditioning value has the form \(y=(u,2u)^{\mathsf T}\). At such a value, the conditional mean is
Consequently \(X\mid Y=(u,2u)^{\mathsf T}\sim\mathcal{N}(3u,1)\). The observation determines \(U=u\), but it reveals nothing about the independent variable \(V\), which accounts for the remaining variance \(1\).
Singularity, Support, and Interpretation
A singular conditioning covariance means that some linear combinations of the coordinates of \(Y\) are deterministic. It does not mean that the conditional formula is undefined. The pseudoinverse ignores those deterministic directions, while the affine support specifies which values can actually be observed. For example, in the preceding calculation a vector \(y=(y_1,y_2)^{\mathsf T}\) with \(y_2\ne2y_1\) has probability zero under the law of \(Y\).
A conditional distribution is defined up to changes on conditioning values that occur with probability zero. The theorem provides a convenient formula on all of \(\mathbb{R}^k\), but only its values on \(\mu_Y+\operatorname{Range}(C)\) are determined by the joint law. In a particularly extreme case, if \(Y\) is deterministic, then \(C=0\), \(C^+=0\), and \(B=0\); the formula gives the unconditional law of \(X\) at the sole possible conditioning value.
The conditional covariance \(\Sigma_{XX}-\Sigma_{XY}\Sigma_{YY}^+\Sigma_{YX}\) is always positive semidefinite, as the proof identifies it as the covariance of a residual vector. It may itself be singular. Thus conditioning can leave exact linear constraints on \(X\), and a valid conditional Gaussian law need not have a density with respect to full-dimensional Lebesgue measure.
Check Your Understanding
Use the covariance-block formula and the support condition to answer these questions.
- What replaces \(\Sigma_{YY}^{-1}\) in the conditional Gaussian formula when \(\Sigma_{YY}\) is singular?
- Why must \(\Sigma_{XY}v=0\) whenever \(v\) belongs to the null space of \(\Sigma_{YY}\)?
- For \(Y=(U,2U)^{\mathsf T}\), which observed values are in the support of \(Y\)?
- In the two-dimensional matrix example, what is the conditional mean when \(y=(1,1)^{\mathsf T}\)?
- Why is the conditional covariance positive semidefinite, even when it is singular?