Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2017/iii/paper-216/3/a/solution

Use the shape-rate convention for every gamma distribution, with . Let and . The Poisson distribution likelihood and the Gamma–Poisson hierarchical model give
All factors involving the coordinate being updated must be retained, including from the conditional gamma distributions. The full conditional distributions are
For a blocked Gibbs sampler, draw from the second full conditional distribution, then redraw all the independently from the first ones. Repeating these two steps preserves the joint posterior distribution; observing after each complete sweep gives the Markov chain used in the next part. Standard gamma distribution sampling works for noninteger as well as integer shapes. The positive observation-period convention is used for the subsequent geometric drift condition.

New to topics? Read the docs here!