Tutorials › Multivariate Statistics (Graduate) › Conditioning Degenerate Gaussian Vectors on Linear Constraints

Gaussian Geometry and Conditioning · Tutorial 107 of 975

Conditioning Degenerate Gaussian Vectors on Linear Constraints

Derive conditional Gaussian laws under linear constraints, accounting for singular covariance, redundant measurements, and the support on which conditioning is meaningful.

Intermediate 10 min read

What You'll Learn

  • Define the support of a degenerate Gaussian vector and a linear image of that vector.
  • Determine when a proposed constraint is compatible with the distribution.
  • Use a Moore–Penrose generalized inverse in the conditional mean and covariance formulas.
  • Derive the conditional Gaussian law using an independent residual.
  • Characterize the conditional support as an intersection of affine constraints.

Why Singular Gaussian Conditioning Needs Care

A Gaussian vector need not have a density over the whole ambient space. If one component is an exact linear combination of others, or if some directions have zero variance, the distribution is concentrated on a lower-dimensional affine set. Conditioning on a linear measurement must respect that restriction: some measurement values are possible, while others cannot occur at all.

For a nonsingular measurement covariance, the familiar conditional Gaussian formulas use an ordinary matrix inverse. With singular covariance, an ordinary inverse does not exist. The Moore–Penrose generalized inverse supplies the corresponding formula, but it does not make impossible constraints possible. The support condition is part of the result.

Definition: A Gaussian vector \(X\in\mathbb{R}^d\) with mean \(\mu\) and covariance matrix \(\Sigma\), written \(X\sim N_d(\mu,\Sigma)\), is degenerate when \(\Sigma\) is positive semidefinite but singular. Its support is the affine set \(\mu+\operatorname{Range}(\Sigma)\). For a matrix \(H\in\mathbb{R}^{k\times d}\), the linear measurement is \(Y=HX\), with mean \(H\mu\) and covariance \(C=H\Sigma H^{\mathsf T}\).

The support statement follows by representing \(X\) as \(\mu+\Sigma^{1/2}Z\), where \(Z\) is a standard Gaussian vector: the possible directions away from \(\mu\) are exactly \(\operatorname{Range}(\Sigma^{1/2})=\operatorname{Range}(\Sigma)\). The measurement \(Y\) is therefore supported on \(H\mu+\operatorname{Range}(C)\). In particular, a proposed value \(y\) is compatible with the model precisely when \(y-H\mu\in\operatorname{Range}(C)\).

For a symmetric positive semidefinite matrix \(C\), its Moore–Penrose inverse \(C^+\) is defined by diagonalizing \(C\): replace each positive eigenvalue by its reciprocal and leave each zero eigenvalue at zero. Thus \(CC^+=C^+C\) is the orthogonal projector onto \(\operatorname{Range}(C)\). When \(C\) is nonsingular, \(C^+=C^{-1}\).

The Conditional Law Under a Linear Constraint

An exact event \(Y=y\) often has probability zero even when \(y\) is in the support. Conditioning at such a value is understood through a regular conditional distribution: a family of conditional laws that gives the usual conditional probabilities when averaged over the distribution of \(Y\). For a Gaussian model, the formula below provides a natural Gaussian version of that family at every point of the support. Outside the support, a conditional law is not determined by the model.

Theorem: Let \(X\sim N_d(\mu,\Sigma)\), where \(\Sigma\) may be singular, let \(Y=HX\), and put \(C=H\Sigma H^{\mathsf T}\). If \(y-H\mu\in\operatorname{Range}(C)\), then a conditional law of \(X\) given \(Y=y\) is Gaussian with $$ E[X\mid Y=y]=\mu+\Sigma H^{\mathsf T}C^+(y-H\mu) $$ and $$ \operatorname{Cov}(X\mid Y=y)=\Sigma-\Sigma H^{\mathsf T}C^+H\Sigma. $$ The conditional support is the intersection of the original support with the constraint set: $$ \bigl(\mu+\operatorname{Range}(\Sigma)\bigr)\cap\{x:Hx=y\}. $$

To prove the formulas, write \(\delta=Y-H\mu\), \(G=\Sigma H^{\mathsf T}C^+\), and define the residual $$ R=X-\mu-G(Y-H\mu). $$ Since \(C^+C\) projects onto \(\operatorname{Range}(C)\), the support condition gives \(CC^+\delta=\delta\). It follows that \(H(\mu+G\delta)=H\mu+\delta=y\): the proposed conditional mean satisfies the constraint.

The residual and \(Y\) are jointly Gaussian because they are affine transformations of \(X\). Their cross-covariance is zero. Indeed, \(\operatorname{Range}(H\Sigma)\subseteq\operatorname{Range}(C)\): writing \(A=H\Sigma^{1/2}\), these ranges are \(\operatorname{Range}(AA^{\mathsf T})=\operatorname{Range}(A)\) and \(\operatorname{Range}(A\Sigma^{1/2})\subseteq\operatorname{Range}(A)\). Therefore \(C^+C H\Sigma=H\Sigma\), and $$ \operatorname{Cov}(R,Y)=\Sigma H^{\mathsf T}-\Sigma H^{\mathsf T}C^+C=0. $$ The standard Gaussian block-independence result says that jointly Gaussian vectors with zero cross-covariance are independent. Thus \(R\) is independent of \(Y\), so the conditional law of \(X\) is the law of \(\mu+G(y-H\mu)+R\). Its conditional mean is \(\mu+G(y-H\mu)\). Directly taking the covariance of \(R\) gives $$ \operatorname{Cov}(R)=\Sigma-GH\Sigma-\Sigma H^{\mathsf T}G^{\mathsf T}+GCG^{\mathsf T} =\Sigma-\Sigma H^{\mathsf T}C^+H\Sigma. $$ Here \(C^+= (C^+)^{\mathsf T}\) and \(C^+CC^+=C^+\), both immediate from the eigenvalue definition. This proves the conditional mean and covariance formulas.

It remains to verify the support claim. Let \(S=\Sigma^{1/2}\) and \(B=HS\). Then \(C=BB^{\mathsf T}\), and the conditional covariance \(K\) can be written $$ K=S\bigl[I-B^{\mathsf T}(BB^{\mathsf T})^+B\bigr]S. $$ The bracketed matrix is the orthogonal projector onto \(\ker(B)\), as follows by applying the eigenvalue definition of the generalized inverse to a singular value decomposition of \(B\). Consequently, \(\operatorname{Range}(K)=\operatorname{Range}(\Sigma)\cap\ker(H)\). The conditional mean belongs to \(\mu+\operatorname{Range}(\Sigma)\) and satisfies \(Hx=y\). A Gaussian distribution with covariance \(K\) is supported on its mean plus \(\operatorname{Range}(K)\). These facts show that its support is exactly the stated intersection. \(\square\)

Worked Applications

Worked Example: Redundant Constraints on a Degenerate Vector

Let \(Z\sim N(0,1)\), \(X=(Z,Z)^{\mathsf T}\), and observe both coordinates, so \(H=I_2\) and \(Y=X\). Find the conditional law at \(y=(2,2)^{\mathsf T}\), and decide whether \(y=(2,3)^{\mathsf T}\) is possible.

The mean is zero and $$ \Sigma=C=\begin{pmatrix}1&1\\1&1\end{pmatrix}. $$ This matrix has eigenvalue \(2\) in the direction \((1,1)^{\mathsf T}\) and eigenvalue \(0\) in the direction \((1,-1)^{\mathsf T}\). Hence $$ C^+=\frac14\begin{pmatrix}1&1\\1&1\end{pmatrix}. $$ For \(y=(2,2)^{\mathsf T}\), the conditional mean is $$ \Sigma C^+y =\begin{pmatrix}1&1\\1&1\end{pmatrix} \frac14\begin{pmatrix}1&1\\1&1\end{pmatrix} \begin{pmatrix}2\\2\end{pmatrix} =\begin{pmatrix}2\\2\end{pmatrix}. $$ The conditional covariance is \(\Sigma-\Sigma C^+\Sigma=0\), so the conditional law is a point mass at \((2,2)^{\mathsf T}\). The value \((2,3)^{\mathsf T}\) is impossible: every possible \(X\) has equal coordinates, and \((2,3)^{\mathsf T}\notin\operatorname{Range}(C)\).

Worked Example: Conditioning a Latent Sum

Let \(U,V\) be independent \(N(0,1)\) variables and \(X=(U,V,U+V)^{\mathsf T}\). Condition on \(Y=X_1+X_2=t\). Calculate the conditional mean and covariance, and describe the support.

The covariance and measurement row are $$ \Sigma=\begin{pmatrix}1&0&1\\0&1&1\\1&1&2\end{pmatrix}, \qquad H=\begin{pmatrix}1&1&0\end{pmatrix}. $$ Thus \(C=H\Sigma H^{\mathsf T}=2\), and \(\Sigma H^{\mathsf T}=(1,1,2)^{\mathsf T}\). The conditional mean is $$ E[X\mid Y=t] =\frac{t}{2}\begin{pmatrix}1\\1\\2\end{pmatrix} =\begin{pmatrix}t/2\\t/2\\t\end{pmatrix}. $$ The conditional covariance is $$ \Sigma-\frac12 \begin{pmatrix}1\\1\\2\end{pmatrix} \begin{pmatrix}1&1&2\end{pmatrix} =\begin{pmatrix}1/2&-1/2&0\\-1/2&1/2&0\\0&0&0\end{pmatrix}. $$ The third coordinate is fixed at \(t\), while the first two vary in opposite directions. Since every original vector satisfies \(X_3=X_1+X_2\), the conditional support is the line \(\{(u,t-u,t)^{\mathsf T}:u\in\mathbb{R}\}\).

Worked Example: A Constraint That Fixes Only One Latent Component

Let \(Z\sim N(0,1)\) and \(W\sim N(0,4)\) be independent, and set \(X=(Z,2Z,W)^{\mathsf T}\). Condition on \(Y=X_1+X_2=c\).

Here $$ \Sigma=\begin{pmatrix}1&2&0\\2&4&0\\0&0&4\end{pmatrix}, \qquad H=\begin{pmatrix}1&1&0\end{pmatrix}, \qquad C=9, \qquad \Sigma H^{\mathsf T}=\begin{pmatrix}3\\6\\0\end{pmatrix}. $$ The conditional mean is $$ \frac{c}{9}\begin{pmatrix}3\\6\\0\end{pmatrix} =\begin{pmatrix}c/3\\2c/3\\0\end{pmatrix}. $$ The covariance subtraction is $$ \frac19\begin{pmatrix}3\\6\\0\end{pmatrix}\begin{pmatrix}3&6&0\end{pmatrix} =\begin{pmatrix}1&2&0\\2&4&0\\0&0&0\end{pmatrix}, $$ so the conditional covariance is \(\operatorname{diag}(0,0,4)\). The constraint fixes \(Z=c/3\), and therefore fixes the first two coordinates, but it does not change \(W\). The conditional support is \(\{(c/3,2c/3,w)^{\mathsf T}:w\in\mathbb{R}\}\).

Interpreting the Support and Avoiding a Common Error

A singular conditional covariance is not a failure of the formula. It records directions that remain deterministic after conditioning. More generally, the conditional support consists precisely of points that both satisfy the original linear restrictions encoded by \(\Sigma\) and obey \(Hx=y\). Redundant rows of \(H\) are allowed; the generalized inverse accounts for them without pretending they provide independent information.

A common mistake is to substitute an ordinary inverse when \(C\) is singular, or to apply the generalized-inverse formula at an impossible value and call the result a conditional law. For example, in the first worked example the vector \((2,3)^{\mathsf T}\) is not in the support of \(Y\). The correction is to check \(y-H\mu\in\operatorname{Range}(C)\) first. If that condition fails, \(Y=y\) is incompatible with the model; the formula does not define a meaningful conditional distribution there.

Key takeaway: For a degenerate Gaussian vector, conditioning on a linear constraint requires two checks: use \(C^+\) in place of \(C^{-1}\), and verify that the proposed measurement value lies in the support \(H\mu+\operatorname{Range}(C)\). The resulting conditional Gaussian is supported on the intersection of the original support and the constraint set.

Check Your Understanding

Use the support condition as well as the conditional formulas when answering.

  1. What does \(\operatorname{Range}(C)\) represent for the measurement \(Y=HX\), and why must \(y-H\mu\) belong to it?
  2. If \(C\) is singular, what does \(C^+\) do to a zero-eigenvalue direction?
  3. For \(X=(Z,Z)^{\mathsf T}\), why is conditioning on \(X=(1,2)^{\mathsf T}\) incompatible with the model?
  4. In the latent-sum example, which direction can vary after conditioning on \(X_1+X_2=t\)?
  5. Why can the conditional covariance remain singular even when the constraint value is compatible?
Clinical Biostats