Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 350 1 a Solution Created 2026-10-03 Updated 2026-10-14
Let be the probability density function of the unknown and that of the noise, both relative to Lebesgue measure. By independence of random variables, the conditional distribution of the measurement given has density . Thus its likelihood function and the joint density areThe Bayesian model evidence is the marginal data densityBayes' theorem gives the posterior density solving this Bayesian inverse problem:This formula applies when . Since by Tonelli theorem, these conditions hold almost everywhere under the marginal data law. Values of a conditional distribution at exceptional data are not determined by the joint law. The posterior mean or a maximum a posteriori estimate can then give a point estimate, while the full posterior density describes the remaining uncertainty.
Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 350 2 a Solution Created 2026-10-03 Updated 2026-10-05
The conditional mean estimator is the posterior meanprovided the first moment is finite. A maximum a posteriori estimate is any maximizer of the posterior density relative to Lebesgue measure:Existence of the posterior density alone does not guarantee a finite posterior mean or existence of a maximizing point.
For the stated multivariate normal distribution and independent standard Gaussian noise, the negative log of the posterior density, up to a constant, isIts precision matrix is a positive-definite matrix, so Gaussian conjugacy for a normal linear model givesThe two forms agree becauseThe covariance matrix is , and the maximum a posteriori estimate equals the posterior mean for this multivariate normal distribution.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 3 28J ii Solution Created 2026-09-24 Updated 2026-09-29
Let be the likelihood function. Since the prior distribution is , the posterior density has the formwhere is the normalizing constant.
Choose and use the Gaussian autoregressive proposal reversible with respect to a standard normal distributionThuswhose covariance matrix is the required . Reversibility with respect to the standard normal distribution sayssoThe Metropolis–Hastings acceptance probability therefore reduces toThis is the Preconditioned Crank–Nicolson algorithm with proposal scale .
Past exam of the mathematics course of the University of Cambridge 2022 iii Paper 219 3 b Solution 2026-09-28
Let and . With the stated improper hyperpriors, the unnormalized posterior density isIts Directed acyclic graph has, for each star, the arrowsfollowed by the deterministic observation arrowsThe latent variables are repeated inside a plate indexed by ; all hyperparameters lie outside that plate.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 216 1 a Solution Created 2026-09-28 Updated 2026-10-03
The likelihood function and prior distribution give the posterior densityCompleting the square in the quadratic form givesThus Gaussian conjugacy for a normal linear model yields
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 207 1 c ii Solution Created 2026-09-24 Updated 2026-09-25
Use the shape-rate convention . The factors involving in the posterior density areBy Poisson-gamma conjugacy,so its posterior mean is .
Poisson change-point posterior Created 2026-10-06 Updated 2026-10-14
For an Inhomogeneous Poisson process whose known positive intensity changes from to at an unknown time , the ordered arrival-time likelihood function isUnder a uniform prior, each interval between successive arrivals has an exponential posterior density with rate in the exponent . Its integrated weights allow exact interval selection followed by a truncated exponential draw; when the two rates coincide, the Bayesian posterior is uniform and the data contain no change-time information.
For a mixed Poisson distribution with known exposure , multiply the unnormalized posterior density by and compare its integral with the next probability mass. The factors give the displayed identity whenever . Both mass probabilities have the same exposure . For a future conditionally independent unit-exposure Poisson distribution count, this is also its posterior predictive expected value. It holds for arbitrary proper mixing distributions, with integrals taken against the prior measure when there is no density.
Posterior score control variate Created 2026-10-05 Updated 2026-10-14
If a smooth posterior density has vanishing boundary terms, its log-posterior gradient satisfies andThis is a posterior integration-by-parts identity; it concerns differentiation in the random parameter, distinct from the usual mean-zero score identity for sampling distributions. It makes a vector control variate. Finite moments and known coefficients preserve unbiasedness of the Monte Carlo estimator.
Variational inference 2026-10-06
Variational inference approximates a posterior distribution by minimizing a Kullback-Leibler divergence over a chosen family of probability distributions. For an unnormalized posterior density and a trial probability density function , minimizing is equivalent to minimizing .