Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2022/iii/paper-219/3/c/solution

A Gibbs sampler draws each variable from its full conditional distribution, so every proposed update is accepted. At the start of a sweep define , , and
First update the reddenings independently as
Recompute and , then make the Gaussian updates
and
With
the remaining full conditionals, in the parameterization given in the question, are the scaled inverse chi-squared laws
Repeating these updates in the displayed order gives a complete Gibbs sweep. The formulas assume and nondegenerate sampled predictors; posterior propriety must be checked because the hyperpriors are improper.

New to topics? Read the docs here!