A GP with kernel k(x,x′)=exp⁡(−(x−x′)2/2) and noise variance σ2=0.1 is trained on (x,y)=(0,1) and (1,2). What are the predictive mean and variance at x∗=0.5?

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

What's being asked

Whether you can carry out GP regression by hand on two points with the standard formulas.

Key idea

Mean =k∗⊤(K+σ2I)−1y and variance =k(x∗,x∗)−k∗⊤(K+σ2I)−1k∗ (add σ2 for a noisy observation).

Steps

  1. Kernel values: k(0,1)=e−0.5=0.6065. The matrix is K+σ2I=(1.10.60650.60651.1).
  2. Determinant: 1.12−0.60652=1.21−0.3679=0.8421. Inverse: 10.8421(1.1−0.6065−0.60651.1)=(1.3062−0.7202−0.72021.3062).
  3. Cross-covariances: k(0,0.5)=k(1,0.5)=e−0.125=0.8825, so k∗=(0.8825,0.8825)⊤.
  4. Weights: α=(K+σ2I)−1y=(1.3062−2⋅0.7202,  −0.7202+2⋅1.3062)=(−0.1343,1.8922).
  5. Mean: 0.8825⋅(−0.1343+1.8922)=0.8825⋅1.7579=1.551. It is a little above the midpoint 1.5, since the second point (with y=2) has more weight.
  6. Variance: k∗⊤(K+σ2I)−1k∗=0.88252⋅(2⋅1.3062−2⋅0.7202)=0.7788⋅1.1720=0.9128. So Var(f∗)=1−0.9128=0.087, and the predictive variance of a noisy observation is 0.087+0.1=0.187.

Common mistakes

How long your answer should be

A page. About 6 minutes.

Last checked on 4 December 2026.

Read this

Previous in Probabilistic models: Show that the predictive distribution of Bayesian linear regression at a new input x has variance σN2(x)=1β+ϕ⊤SNϕ, where ϕ=ϕ(x) is the feature vector. How do you show that the second term can only shrink when a new data point is added?
Next in Probabilistic models: A target distribution on three states is π=(0.5,0.3,0.2). A Metropolis sampler proposes one of the two other states with probability 12 each, and accepts with probability min⁡(1,πj/πi). What is the transition matrix, and how do you check that π is stationary and that detailed balance holds?