Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 40 3 a ii Solution Created 2026-10-03 Updated 2026-10-14
Write , , , , and , with positive-definite. For fixed , the terms involving in the posterior exponent areComplete the square. With and , this givesFor fixed , collect the powers and exponential terms involving :Hence, in the paper's shape-scale inverse-gamma distribution convention,There is no extra in this shape, because the normal coefficient prior is independent of . These are the independent normal and inverse-gamma regression priors conditionals.
The Gaussian normalization printed in the PDF is incorrect. The proper -dimensional prior probability density function is . For fixed this correction is constant in and leaves the two conditionals unchanged, but it must be retained when comparing different model orders in part (b).
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 47 5 b i Solution Created 2026-10-03 Updated 2026-10-14
Let , , and . Under the standard interpretation that the two stated priors are independent, multiply the normal likelihood by the normal coefficient prior and the inverse-gamma distribution density. The independent normal and inverse-gamma regression priors giveFor a fixed model the determinant and Gaussian normalizing constants are independent of and may be omitted here; is assumed positive-definite. The coefficient prior is not scaled by , so replacing its precision by would describe a different prior.
For an additional check, completing the coefficient square and reading the variance kernel give the full conditional distributionsandMarginal priors alone would not determine their joint prior without the independence assumption. The front-page inverse-gamma mean has a typographical error: this density has mean when , not a denominator . The density itself, used in the posterior calculation, fixes the correct parameterization.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 47 5 a iii Solution Created 2026-10-03 Updated 2026-10-14
Choose an initial . At each iteration, evaluate and using and draw from the conditional multivariate normal distribution just derived. Next compute and drawFor example, generate and set . A draw of the conditional multivariate normal distribution can be formed as with a Cholesky decomposition and a vector of independent standard normal distributions.
This two-block Gibbs sampler alternates the full conditional distributions of the independent normal and inverse-gamma regression priors posterior. The conditional-integration argument proves that its invariant distribution is the joint posterior distribution. Under the usual convergence conditions, retain the pairs after an initial transient as the requested dependent posterior sample. The new variance update uses the newly drawn coefficients, rather than the previous coefficients.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 47 5 a ii Solution Created 2026-10-03 Updated 2026-10-14
Use the shape-scale convention for the inverse-gamma distribution: has density proportional to for . Write , , , and . The independent normal and inverse-gamma regression priors make the conditional log-likelihood plus log prior in equal, up to a constant, toDefine and . Completing the square turns this expression into plus a constant. Thus the conditional posterior distribution is the multivariate normal distributionPositive definiteness of the prior covariance matrix makes this well defined even if the design matrix is rank deficient.
Holding fixed, the factors depending on areConsequentlyThere is no additional in the shape: the normal distribution prior for is independent of . A prior scaled by would be a different model and would change that calculation.