Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 37 6 i c Solution Created 2026-10-03 Updated 2026-10-06
For , put and . Removing all factors independent of from the posterior distribution gives, for ,A stable implementation uses the difference of the log weights. The conditional log odds areso , a logistic function. For very large , evaluate this logistic expression using the sign of to avoid exponential overflow.
For Gibbs sampling for a finite hidden spin field, initialize any spin configuration. At every step choose uniformly, draw a fresh uniform variable, set spin to with the probability above and to otherwise, and leave all remaining spins fixed. This Random-scan Gibbs sampler has the stated posterior distribution invariant by detailed balance of a random-scan Gibbs sampler. All conditional probabilities are strictly between zero and one. For the one-site case, the conditional probabilities are both .