In Part 3, we introduced the important and powerful idea of applying geometric ideas about vectors in 2D and 3D space to complex mathematical objects such as random variables and waveforms. We will now show how to use these geometric ideas to understand and visualize an important and frequently-used method in Bayesian inference: finding the conditional distribution of one set of Gaussian rvs given another.

We will work with the example of a simple Markov chain to illustrate these ideas. Consider iid standard Gaussian rvs , and the Markov chain
of Gaussian rvs
where
.
Clearly, has zero mean and the covariance:
. The lengths of the three vectors are
. The correlation coefficient between
is
and the angle between them is
. Likewise for
we have
and the angle between them is
and so on.
Conditioning: an easy example. As a warm-up exercise, let us find the conditional distribution of given
. This is straightforward because knowing
tells us that
, but since
are independent of
, their distributions do not change. Thus we have
. The conditional means of
is
and their conditional covariance is
.
Brute-Force Method. Now let’s find the conditional distribution of given
. This is not as straightforward as the previous case because
is correlated with all three of
and all of their distributions will change when we condition on
.
We can, of course, always find the conditional distribution algebraically using the known joint and marginal distributions as . But we want to avoid this brute-force approach and would like to find a more elegant, intuitive method. We now show how to do this using geometric manipulations with vectors.
Conditioning Elegantly. Consider the figures below that shows the geometric relationship between and
. (Note that we cannot show all three vectors representing
on the same planar vector diagram and preserve geometric relationships such as angles; this is because the three rvs are linearly independent which means the corresponding vectors are not coplanar.)

The key idea is to project the vector in the direction of
, so that we can express
as the sum of two component vectors, one
that is perfectly aligned with
and the other perfectly orthogonal to
. By definition,
for some constant
. We need to find this constant in terms of the statistics of
.
Projection using Basic Trigonometry. We now show how to do this using very elementary geometric arguments. Let denote the unit vector in the direction of
. By definition,
. From the trigonometry of the right-angled triangle formed by the vectors
, we have
and
which gives
and
.
Thus we have , where
is independent of
. Therefore
. Similarly, we can show that
.
Conditional Covariance. We have almost completed the task we set ourselves: to find the conditional distribution of given
. In particular, we have now calculated the means and variances of
and therefore the conditional marginal distributions of
given
. However, to find the conditional joint distribution of
, we also need to find their conditional covariance. This is easily done as follows:
. Note that since both
are independent of
, this expectation is unaffected by conditioning on
and is easily evaluated as:
.
These ideas can be generalized in a fairly straightforward way to conditioning on multiple random variables and these generalizations form the core of some very important and powerful techniques in statistical inference. A famous example of such a technique is the Kalman Filter. We will conclude this topic with a summary and a few further comments about applications in Part 5.
One thought on “The Gaussian distribution — 4: Conditioning like a Pro”