Let X be a Gaussian vector over Rn with mean μ and covariance matrix Σ. Split X in two bits, say X=(X1,X2) with respective sizes n1,n2 (here n1+n2=n). What is the conditional distribution of X1 given X2? First, let us split the mean and covariance of X into the corresponding blocks:
μ=[μ1μ2]Σ=[Σ1,1Σ2,1Σ1,2Σ2,2]
so that for example X1 is a Gaussian with mean μ1 and covariance Σ1,1. Obviously, since Σ is symmetric, Σ2,1=Σ1,2⊤.
Theorem. The distribution of X1 conditionally on X2 is a Gaussian random variable with mean m=μ1+Σ1,2Σ2,2−1(X2−μ2) and with covariance S=Σ1,1−Σ1,2Σ2,2−1Σ1,2⊤.
It is well known that the conditional distribution of X1 given X2=y is
f(x∣y)=∫f(x,y)dxf(x,y).
We could perform this exact computation and find the claim in the theorem but. To proceed, we need to find the expression of the inverse of Σ. That is doable, and indeed the famous Schur formulas tell us that
where S is called the Schur complement of the first block of Σ,
S=Σ1,1−Σ1,2Σ2,2−1Σ2,1.
We immediately recognize (3). By carefully reorganizing the terms inside f(x,y) we would readily find that f(x∣y) is proportional to
exp(−21⟨x−m,S−1(x−m)⟩)
hence the theorem would be proved.
I find this method computational and I never remember the block-inversion formula (6).
Instead, there is a simpler, more conceptual path: observe that logf(x,y) is a quadratic function in (x,y), hence when y is fixed, logf(x,y) is still a quadratic function in x. But obviously, log-quadratic probability densities are precisely Gaussian densities. We just proved that
the conditional distribution of a Gaussian vector remains Gaussian.
Hence, all we have to do is to compute the conditional mean and the conditional variance, namely
To compute (10), there is a clever trick. The idea is to remove the part of X1 wich depends on X2, to get something independent of X2. Indeed, we want to find a matrix M such that Z=X1+MX2 is independent of X2. Since Z,X2 are jointly Gaussian, they only need to be decorrelated, that is E[ZX2⊤]=0 which translates into E[X1X2⊤]+ME[X2X2⊤]=0, hence