Conditional and marginal Gaussians, and learning one point at a time
10 questions on conditional and marginal Gaussians, linear-Gaussian models, sums of Gaussians, bias in covariance estimates and sequential estimation.
- 10 questions
- Stopwatch
- Instant feedback
Sample questions
Play now ↑Answers stay hidden. Start the quiz to play them.
Sample 1
How does the conditional covariance, the spread around that best guess, depend on the particular values observed?
- It shrinks to zero for any observation
- It grows as the observed values grow
- It is the same whatever values were observed
Sample 2
Two independent Gaussian quantities are added together. What is the result?
- A Gaussian whose variance is the average of the two variances
- A Gaussian whose mean is the sum of the two means and whose variance is the sum of the two variances
- A distribution with two peaks
How it works
- One question per screen. An answer is final once sent.
- You see right away whether you were right, with a short explanation.
- The stopwatch runs: on equal scores, the faster player ranks first.
- Only your best attempt counts, so replaying is never risky.
About this quiz
Gaussian distributions are so widely used partly because they are closed under the operations you most want to perform. Take two groups of variables that are jointly Gaussian. Ask about one group while ignoring the other, and you get another Gaussian. Fix the other group to an observed value, and again you get a Gaussian. Combine a Gaussian belief with a Gaussian measurement, and the updated belief is still Gaussian. This closure is why Gaussian models show up in everything from sensor fusion to the hidden layers of generative models, and why so many calculations in them can be done exactly.
This quiz explores those properties through their meaning, without algebra. You will see what happens to the centre and the spread of a distribution when you condition on an observation, and how this differs from simply ignoring a variable. A notable fact is that the best guess of one variable given another is a straight-line function of the second, while the uncertainty around that guess has a surprising property. You will also see how combining a prior belief with a noisy linear measurement leads to a posterior, an instance of Bayes' theorem in its most convenient form, and what happens when two independent Gaussian quantities are added.
The second half turns to estimation from data. Maximum likelihood estimates of the mean and covariance have a simple form, but one of them is biased in a way that is familiar from the one-variable case. Finally, the quiz introduces sequential estimation: instead of keeping the whole data set, you update your estimate one observation at a time and throw the observation away. You will be asked how each new point changes the estimate and why this is valuable when data arrive continuously or in quantities too large to hold at once.
Mistakes to avoid include confusing conditioning with marginalising, assuming that conditioning always reduces uncertainty in a way that depends on the value observed, and treating the maximum likelihood covariance as exact. Another is to think that working one point at a time must give worse answers than working with all of the data together. These results are the reason that Gaussian models can be updated, combined and queried exactly, while most other model families need approximation. If you have heard of a Kalman filter, which tracks a moving object from noisy measurements, it is built on exactly these properties, applied over and over as each new measurement arrives.
The quiz suits students and practitioners who know what a Gaussian is and want to see why it is so convenient. No matrix algebra is needed. There are 10 questions, with an explanation after each, and the quiz takes about four minutes.
Questions and answers
›How long does the quiz take?
About 3 to 4 minutes for 10 questions, at roughly 20 seconds each. An explanation appears after every answer.
›Do I need to know matrix algebra?
No. The questions are about what happens to a distribution, not about calculating it. If you can picture a cloud of points shaped like a tilted ellipse, you can follow every question.
›What is the difference between conditioning and marginalising?
Marginalising means ignoring a variable by summing or integrating over all of its values. Conditioning means fixing a variable at an observed value and asking what that tells you about the others. For a Gaussian cloud, the marginal is the shadow of the cloud on one axis, while the conditional is a slice through it.
›What is a precision matrix?
It is the inverse of the covariance matrix. Some properties of Gaussians are easier to express with the covariance, and others with the precision. Marginal distributions are simplest in terms of the covariance, and conditional distributions are simplest in terms of the precision.
›What is a linear-Gaussian model?
It is a model in which one variable has a Gaussian distribution and a second variable is Gaussian with a mean that depends linearly on the first and a spread that doesn't. Many generative and sensor models have this form. The joint distribution, the marginal of the second variable and the posterior of the first are all Gaussian.
›How does Bayes' theorem look for Gaussians?
With a Gaussian prior over a quantity and a linear-Gaussian measurement of it, the posterior is a Gaussian whose centre sits between the prior mean and the measurement, closer to whichever is more certain. The calculation is exact, which makes it a common building block.
›Why is the maximum likelihood covariance biased?
For the same reason as in one dimension. The spread is measured around the estimated mean, which has been tuned to the sample, so on average it comes out too small. Multiplying by the number of observations divided by one less than that number removes the bias.
›What is sequential estimation, and why is it useful?
It processes data points one at a time, updating the estimate and then discarding the point. It is useful for online systems where data arrive continuously, and for data sets that are too large to process all at once. For the mean of a Gaussian, the final answer is exactly the same as in the batch method. A practical bonus is numerical. An online estimate needs only a running total and a count, so it uses the same small amount of memory for ten observations as for ten billion, and it can be reported at any moment, which is exactly what a monitoring system needs.