What are the posterior predictive mean and variance of Gaussian process regression, and how are they derived? With one training point x1=0, y1=1, noise variance σn2=0.1 and kernel k(x,x′)=exp⁡ ⁣(−(x−x′)2/2), what are they at x∗=1?

Probabilistic models, Gaussian processes
Level L3 Intermediate. Length Long. Nature Mat Mathematical.

What's being asked

Whether you can set up the joint Gaussian of the training targets and the test function value, condition on the data, and interpret the result.

Key idea

Under a zero-mean GP prior, (yf∗)∼N(0,(K+σn2Ik∗k∗⊤k(x∗,x∗))), so Gaussian conditioning gives fˉ∗=k∗⊤(K+σn2I)−1y and Var⁡(f∗)=k(x∗,x∗)−k∗⊤(K+σn2I)−1k∗.

Steps

  1. State the model: f∼GP(0,k), yi=f(xi)+εi with εi∼N(0,σn2). Define Kij=k(xi,xj) and (k∗)i=k(xi,x∗).
  2. Write the joint Gaussian in the key idea. The noise adds σn2I only to the training block, because f∗ is the noise-free function value.
  3. Apply the conditioning formulas μ1∣2=Σ12Σ22−1y and Σ1∣2=Σ11−Σ12Σ22−1Σ21, with f∗ as block 1 and y as block 2.
  4. Numbers: K=k(0,0)=1, so K+σn2=1.1; k∗=e−1/2≈0.6065; k(x∗,x∗)=1.
  5. Mean: 0.6065×1/1.1≈0.551. Variance: 1−e−1/1.1=1−0.3679/1.1≈1−0.334=0.666. For a new noisy observation y∗, add σn2: 0.766.
  6. Interpret: the mean is pulled towards the observation in proportion to kernel similarity; the variance shrinks near the data and returns to the prior variance 1 far away. The inverse costs O(n3), so in practice use a Cholesky factorisation.

Common mistakes

How long your answer should be

One page: the derivation in 4–5 lines, then the numbers; about 8 minutes.

Last checked on 4 December 2026.

Read this

Previous in Probabilistic models: Why does an iteration of the EM algorithm never decrease the observed-data log-likelihood?
Next in Probabilistic models: How does the Bayesian model evidence p(D∣M) penalise an over-complex model, without any explicit penalty term?