In the model y=wx+ε with prior w∼N(0,1) and noise ε∼N(0,0.25), you observe (x,y)=(1,2) and (2,3). Find the posterior mean and variance of w. How is the posterior mean related to ridge regression?

Probabilistic models, Bayesian linear regression
Level L2 Elementary. Length Short. Nature Mat Mathematical.

What's being asked

Whether you can use the conjugate Gaussian update, and relate the posterior mean to a ridge solution.

Key idea

With prior precision α and noise precision β: S−1=α+β∑xn2 and m=βS∑xnyn.

Steps

  1. Prior variance 1 means prior precision α=1. Noise variance 0.25 means noise precision β=4.
  2. ∑xn2=1+4=5 and ∑xnyn=2+6=8.
  3. Posterior precision and mean: S−1=1+4⋅5=21, so the posterior variance is S=1/21=0.0476, and the posterior mean is m=4⋅(1/21)⋅8=32/21=1.524.
  4. Ridge link: the posterior mean minimises ∑(yn−wxn)2+(α/β) w2, so λ=α/β=0.25. Check: 8/(5+0.25)=1.524, the same value.
  5. Compared with the least-squares estimate 8/5=1.6, the prior pulls the mean slightly towards 0.

Common mistakes

How long your answer should be

5–6 lines.

Read this

Previous in Probabilistic models: A 1D Gaussian mixture has two components with unit variance, means μ1=0 and μ2=4, and weights π1=0.7 and π2=0.3. For the data points x=3 and x=1, what are the responsibilities of component 1? What are the M-step updates of μ1 and π1 using only these two points (keeping the other parameters fixed)?
Next in Probabilistic models: A coin has unknown heads probability θ with prior θ∼Beta(2,2). After 10 tosses you see 7 heads and 3 tails. Find the posterior, the MLE, the MAP estimate and the posterior mean. What is the probability that the next toss is heads, and the probability that the next two tosses are both heads?