Let and . With the stated improper hyperpriors, the unnormalized posterior density is
Its Directed acyclic graph has, for each star, the arrows
followed by the deterministic observation arrows
The latent variables are repeated inside a plate indexed by ; all hyperparameters lie outside that plate.
Write
Multiplying the likelihood by the improper prior gives the Bayesian posterior kernel
Since
the first full conditional is
Holding fixed and comparing powers and exponential rates gives
The assumed parity of makes a positive integer.
Initialize arbitrarily. At iteration , put
Draw independent uniform variables and set
By sampling an integer-shape gamma distribution, this has the required law. Next draw independently and set
These are exactly the two full-conditional updates of the normal mean-precision Gibbs sampler. After discarding burn-in, the pairs are approximate samples from the posterior by Markov chain Monte Carlo.