Normal mean-precision Gibbs sampler
= Normal mean-precision Gibbs sampler
For independent $Z_i\mid\mu,\omega\sim N(\mu,\omega^{-1})$, a flat prior on $\mu$, and an exponential prior of rate $\lambda$ on $\omega$, the full conditionals are
$$
\mu\mid\omega,z\sim N\left(\bar z,\frac1{n\omega}\right),
$$
and
$$
\omega\mid\mu,z\sim
\operatorname{Gamma}\left(\frac n2+1,\,
\lambda+\frac12\sum_i(z_i-\mu)^2\right),
$$
where the gamma distribution is parametrized by shape and rate.