🧮 Brain Teaser

The Precision Matrix Miracle: Why Zero Entries Mean Independence

Let X=(X1,X2,…,Xp)T∼N(μ,Σ)X = (X_1, X_2, \ldots, X_p)^T \sim \mathcal{N}(\mu, \Sigma) be a multivariate Gaussian, with Σ\Sigma positive definite. Let Θ=Σ−1\Theta = \Sigma^{-1} be the precision matrix.

Show that XiX_i and XjX_j are conditionally independent given all other variables X−ijX_{-ij} if and only if Θij=0\Theta_{ij} = 0.

In other words: the sparsity pattern of Θ−1\Theta^{-1}, not Σ\Sigma, encodes the conditional independence graph.

Why is this surprising? Give a simple 33-variable example where Σij≠0\Sigma_{ij} \neq 0 (so Xi,XjX_i, X_j are marginally correlated) but Θij=0\Theta_{ij} = 0 (so Xi⊥Xj∣XkX_i \perp X_j \mid X_k).

Gaussian graphical modelsprecision matrixconditional independencepartial correlationSchur complement

Answer: Precision Matrix and Conditional Independence

Key Idea / Intuition

For a Gaussian, all conditional distributions are still Gaussian, and conditional independence is captured entirely by second-order structure. The precision matrix Θ=Σ−1\Theta = \Sigma^{-1} encodes partial correlations — correlation after removing the linear effect of all other variables. A zero entry Θij=0\Theta_{ij} = 0 means that once you control for everything else, XiX_i and XjX_j carry no additional information about each other. This is fundamentally different from Σij=0\Sigma_{ij} = 0 (marginal independence), which is a much stronger and less common condition. The miracle: invert the covariance matrix, and read off the graph directly.


Formal Proof / Solution

Step 1: Conditional distribution of a Gaussian

Partition X=(XA,XB)X = (X_A, X_B) where A={i,j}A = \{i, j\} and BB is everything else. The conditional distribution XA∣XB=xBX_A \mid X_B = x_B is Gaussian with:

XA∣XB∼N ⁣(μA+ΣABΣBB−1(xB−μB), ΣAA−ΣABΣBB−1ΣBA)X_A \mid X_B \sim \mathcal{N}\!\left(\mu_A + \Sigma_{AB}\Sigma_{BB}^{-1}(x_B - \mu_B),\ \Sigma_{AA} - \Sigma_{AB}\Sigma_{BB}^{-1}\Sigma_{BA}\right)

So Xi⊥Xj∣X−ijX_i \perp X_j \mid X_{-ij} iff the conditional covariance (ΣAA∣B)ij=0(\Sigma_{AA\mid B})_{ij} = 0.

Step 2: Schur complement and the precision matrix

The Schur complement identity says: if we write the block structure

Θ=Σ−1=(ΘAAΘABΘBAΘBB),\Theta = \Sigma^{-1} = \begin{pmatrix} \Theta_{AA} & \Theta_{AB} \\ \Theta_{BA} & \Theta_{BB} \end{pmatrix},

then the inverse of the Schur complement gives:

ΣAA−ΣABΣBB−1ΣBA=ΘAA−1.\Sigma_{AA} - \Sigma_{AB}\Sigma_{BB}^{-1}\Sigma_{BA} = \Theta_{AA}^{-1}.

So the conditional covariance of (Xi,Xj)(X_i, X_j) given the rest is exactly ΘAA−1\Theta_{AA}^{-1}, the 2×22\times 2 submatrix of Θ\Theta involving just rows/columns i,ji, j, inverted.

Step 3: The key identity

For two variables, the 2×22\times 2 matrix

ΘAA=(ΘiiΘijΘjiΘjj)\Theta_{AA} = \begin{pmatrix} \Theta_{ii} & \Theta_{ij} \\ \Theta_{ji} & \Theta_{jj} \end{pmatrix}

has inverse

ΘAA−1=1ΘiiΘjj−Θij2(Θjj−Θij−ΘjiΘii).\Theta_{AA}^{-1} = \frac{1}{\Theta_{ii}\Theta_{jj} - \Theta_{ij}^2}\begin{pmatrix} \Theta_{jj} & -\Theta_{ij} \\ -\Theta_{ji} & \Theta_{ii} \end{pmatrix}.

The off-diagonal entry of the conditional covariance (i.e., Cov(Xi,Xj∣X−ij)\text{Cov}(X_i, X_j \mid X_{-ij})) is proportional to −Θij-\Theta_{ij}.

Therefore:

Xi⊥Xj∣X−ij  ⟺  Cov(Xi,Xj∣X−ij)=0  ⟺  Θij=0.■X_i \perp X_j \mid X_{-ij} \iff \text{Cov}(X_i, X_j \mid X_{-ij}) = 0 \iff \Theta_{ij} = 0. \quad \blacksquare


Step 4: A concrete 3-variable example

Let X1→X2←X3X_1 \to X_2 \leftarrow X_3 be a "common cause" structure — actually let's do a chain: X1→X2→X3X_1 \to X_2 \to X_3.

Take: X1∼N(0,1),X2=X1+ε2,X3=X2+ε3X_1 \sim \mathcal{N}(0,1), \quad X_2 = X_1 + \varepsilon_2, \quad X_3 = X_2 + \varepsilon_3

with ε2,ε3∼iidN(0,1)\varepsilon_2, \varepsilon_3 \overset{iid}{\sim} \mathcal{N}(0,1) independent. Then:

Σ=(111122123).\Sigma = \begin{pmatrix} 1 & 1 & 1 \\ 1 & 2 & 2 \\ 1 & 2 & 3 \end{pmatrix}.

Note Σ13=1≠0\Sigma_{13} = 1 \neq 0, so X1X_1 and X3X_3 are marginally correlated.

Computing Θ=Σ−1\Theta = \Sigma^{-1}:

Θ=(2−10−12−10−11).\Theta = \begin{pmatrix} 2 & -1 & 0 \\ -1 & 2 & -1 \\ 0 & -1 & 1 \end{pmatrix}.

The (1,3)(1,3) entry is Θ13=0\Theta_{13} = 0! So X1⊥X3∣X2X_1 \perp X_3 \mid X_2, which makes perfect sense: in the chain X1→X2→X3X_1 \to X_2 \to X_3, once you know X2X_2, knowing X1X_1 tells you nothing extra about X3X_3 (d-separation / Markov property).


Why This Is Deep

The moral: correlation is not conditional independence. The covariance matrix Σ\Sigma tells you about marginal relationships; the precision matrix Θ=Σ−1\Theta = \Sigma^{-1} tells you about the conditional graph structure. This is the foundation of Gaussian graphical models and the graphical LASSO (glasso), which estimates a sparse Θ\Theta to learn which edges are truly present in the dependency graph.

The partial correlation between XiX_i and XjX_j given all others is:

ρij∣rest=−ΘijΘiiΘjj.\rho_{ij \mid \text{rest}} = \frac{-\Theta_{ij}}{\sqrt{\Theta_{ii}\Theta_{jj}}}.

So reading off partial correlations from the precision matrix is as easy as reading marginal correlations from the covariance matrix.

Source: The Elements of Statistical Learning, Chapter 17 (Hastie, Tibshirani, Friedman)

Type: ML/StatsSource: The Elements of Statistical Learning, Chapter 17 (Hastie, Tibshirani, Friedman)Edit on GitHub ↗