Past exam of the mathematics course of the University of Cambridge 2008 ii Paper 4 27I Solution Created 2026-09-24 Updated 2026-10-14
A sufficient statistic has a conditional distribution of the data given that does not depend on the parameter. In a dominated family, the factorization criterion for sufficiency states that this is equivalent to for a nonnegative parameter-free . Bayes' formula then gives a posterior distribution proportional to , because cancels from numerator and normalizing denominator. Thus the posterior depends on the data only through .
For the normal sample,The first term is parameter-free, so the factorization proves sufficiency of . Combining its likelihood with the normal prior and completing the square givesThe prior predictive distribution of the sample mean is obtained from , independent of :
Define the Bayes factor as the marginal likelihood under divided by that under . The common residual factor cancels, so it is the ratio of the densities of under these two hypotheses:The reverse Bayes factor is its reciprocal. At ,for a fixed positive . Thus the frequentist test is at its rejection threshold while fixed prior odds give increasingly strong posterior support for the point null. This is the Jeffreys-Lindley paradox for a Gaussian point null: the standardized statistic stays fixed, but the observed effect tends to zero and the fixed-scale alternative spreads predictive mass much more widely. There is no logical contradiction, since the procedures compare hypotheses using different calibrations. For the degenerate the hypotheses coincide and .
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 36 3 f Solution Created 2026-10-03 Updated 2026-10-14
Under the common observation-level Bayesian deviance convention, DIC is , with the effective parameter count in DIC defined by . The no-random-effect model's effective count is near three, corresponding to its three fitted regression coefficients. With plate random effects, the effective count rises to : the local effects add flexibility, but their partial pooling means they do not count as eighteen fully independent unrestricted fitted parameters. The effective count need not be an integer or equal the raw parameter count; the scale parameter controls that shrinkage.
Adding the plate effects reduces the average Bayesian deviance by at an effective-complexity cost of . Therefore its DIC is lower byThe reported criterion favours the overdispersed model. This is a fit-complexity comparison, not a posterior probability or Bayes factor. In a hierarchical Bayesian model, the interpretation depends on whether deviance is conditional on local effects or has marginalized them out; these figures use the supplied observation-level convention.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 36 4 a Solution Created 2026-10-03 Updated 2026-10-14
Compute the Bayesian model evidence for each model by integrating its sampling density against its parameter prior:The posterior odds are the prior odds multiplied by the Bayes factor:The parameter priors used for evidence must be normalized; arbitrary normalization constants in model-specific improper priors would make this comparison undefined.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 36 1 b Solution Created 2026-10-03 Updated 2026-10-14
Use the orientation that favours the null hypothesis:For a composite model the denominator is its Bayesian model evidence, obtained by integrating the likelihood against the model's prior distribution. This Bayes factor exceeds one when the observed data have greater marginal probability under . By Bayes' theorem,Thus the posterior odds equal the prior odds multiplied by the Bayes factor. The reciprocal orientation instead gives .
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 36 1 f Solution Created 2026-10-03 Updated 2026-10-14
Substituting the standardized deviation into the Bayes factor approximation givesThis is only a slight preference for the alternative, despite the small p-value. The two procedures measure different things: the p-value sums a tail under the null hypothesis, while the Bayes factor compares probabilities of the observed count under both models. The uniform alternative prior distribution spreads its probability over many success probabilities that fit the observations poorly. Only a narrow range around has large likelihood, and integrating over the whole alternative penalizes this diffuse prediction.
The prefactor makes the distinction especially clear. At a fixed standardized deviation , the p-value stays approximately , whereas eventually grows with . A fixed diffuse alternative can consequently favour the point null even while a conventional test rejects it. This is the same prior-width mechanism illustrated by the Jeffreys-Lindley paradox for a Gaussian point null.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 36 1 h Solution Created 2026-10-03 Updated 2026-10-14
No. A Bayes factor favouring the alternative means , but the posterior odds are . They are less than one only if . For example, prior odds of on the null hypothesis, combined with a Bayes factor of in favour of the alternative, still give posterior odds of on the null hypothesis. An unusual claim can require substantial evidence to overcome low initial plausibility.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 36 2 h Solution Created 2026-10-03 Updated 2026-10-14
The posterior probability answers a natural directional question: how likely is this area's risk to exceed the reference risk? It accounts for uncertainty rather than declaring an increase from the point estimate alone. However, it does not distinguish a negligible increase from a clinically important one, and it combines prior beliefs with evidence from the data. With an informative prior distribution, a large probability may already have been present before observation, or a genuinely surprising count may be strongly moderated by the prior.
To measure the evidence supplied by the observations, compare posterior and prior odds. If under the chosen proper prior distribution, the Bayes factor for increased versus nonincreased risk isThis follows from the posterior odds identity when the two models use the original prior conditioned respectively on and . For the specified prior, is the upper tail at one of ; centering its mean at one does not make this tail probability exactly . To address seriousness itself, choose a substantive excess and report the posterior probability of , together with an interval for the size of the excess. An evidence ratio and a meaningful risk threshold answer different, complementary questions.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 36 4 g Solution Created 2026-10-03 Updated 2026-10-14
The reported deviance information criterion differs byModel 3 has a mean Bayesian deviance worse by only , but its effective parameter count in DIC is lower by . The small fit cost is more than offset by the reduced complexity penalty, so the criterion gives a mild preference to Model 3. A difference this small should not be presented as decisive evidence, especially without the Monte Carlo error of the criterion difference.
The counts and are effective rather than literal parameter numbers. The likelihood includes child-specific intercepts and uncertain true baselines as well as global coefficients. With 106 of each local quantity and seven global parameters, Model 2 has 219 stochastic unknowns in a natural full representation, but partial pooling and other prior information reduce their effective contribution. Fixing two slopes lowers the effective count by about two, with a further small change from the fitted posterior. There is no reason for to be an integer, or to equal just the number of population-level regression coefficients.
For illustration, the deviances evaluated at posterior means implied by the table are for Model 2 and for Model 3. These differ from the average deviances because averaging a nonlinear deviance is not the same as evaluating it at an averaged parameter. This interpretation presumes the same observed-data likelihood convention in both fits; integrating local variables out before forming the deviance would define a different comparison. The DIC difference is not a Bayes factor.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 29 4 Solution Created 2026-10-03 Updated 2026-10-07
The reversible-jump Markov chain Monte Carlo state comprises the model index and that model's parameter. Its unnormalized posterior density in model isFor models of equal dimension, choose model with probability and propose using density on the destination parameter space. The equal-dimension reversible-jump acceptance probability isOn acceptance change both model and parameter; on rejection retain both. Choose model proposals connecting all models of positive posterior mass and within-model kernels exploring their supports, with aperiodicity, to obtain an ergodic chain. Include within-model updates targeting its conditional posterior, and use model occupation proportions after the initial transient to estimate posterior model probabilities. The formula includes the model prior probabilities, parameter prior densities, likelihoods, reverse model-selection probability, and reverse parameter-proposal density.
This direct-density formula is Metropolis–Hastings algorithm on a disjoint union of equal-dimensional spaces. If instead a move uses a deterministic bijection with auxiliary proposal densities and , useThe Jacobian determinant is one for identity matching, but equal model dimensions alone do not make a nonlinear map volume-preserving. For a direct proposal density the change of variables is already included in that density, so no additional Jacobian factor is inserted.
For the two Poisson models, use the shape-rate convention for the gamma distribution:If denotes scale instead, replace every occurrence of the rate below by . Introduce the inactive under model with the proper pseudo-prior , independent of . This pseudo-prior augmentation for model comparison does not change model 's marginal likelihood because the inactive density integrates to one. The two augmented targets on the same positive quadrant arewhereUse a symmetric cross-model proposal that flips the model label and leaves both parameters unchanged. The matching map is the identity, with unit Jacobian determinant, and the common prior factors cancel. Hence the model-switch acceptance probabilities areOnly the second observation's factor changes because is retained as its shared candidate mean. Evaluate the ratio on a logarithmic scale as for the first direction.
For within-model moves, Poisson-gamma conjugacy gives exact Gibbs sampling refreshes:The two draws are conditionally independent within either model. Choose with fixed positive probabilities between this block refresh and the cross-model proposal. Both moves preserve the augmented posterior; refreshing the inactive parameter maintains its correct distribution and supports mixing. The fraction of retained states labelled estimates .
An equivalent literal dimension-changing implementation deletes on a proposed move, and on a move draws an auxiliary and sets . The birth matching has dimensions and unit Jacobian determinant. Its proposal density cancels the new parameter's prior density, giving the same acceptance ratios above for symmetric selection of move directions. This provides suitable moves without storing an inactive parameter.
For an independent check of Poisson mean equality model comparison, the exact Bayes factor isIt follows by integrating the two gamma likelihood kernels; the common factorial terms cancel. With equal model priors, the exact posterior probability of is , which can also be used to check the RJ-MCMC occupation estimate.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 34 4 d Solution Created 2026-10-03 Updated 2026-10-14
Model gives the sequential forecast . The probability chain rule yieldsApplication of Bayes' theorem makes the factors successive posterior predictive distributions, and their product is the Bayesian model evidence. Under conditionally independent sampling it isTaking logarithms gives the prequential log score identityTherefore the Bayes factor isThis solves the second half of part (d), which is missing from the TeX. Proper priors and finite positive evidences are needed; unrelated improper-prior normalizing constants do not cancel.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 3 c Solution Created 2026-10-03 Updated 2026-10-06
Write , with independent and . The convolution of independent random variables is again a normal distribution, so the prior predictive laws areThese are predictive distributions before observing , hence the Bayesian model evidence for the observed mean. The residual information in the original observations is common to both models and cancels in their Bayes factor.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 3 d Solution Created 2026-10-03 Updated 2026-10-06
Divide the two normal distribution predictive densities to obtain the Bayes factorAt this becomesThe wider prior distribution spreads its predictive mass over more possible means, giving the narrower model more Bayesian model evidence for observations very near zero. Away from zero, the exponential term opposes that factor.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 3 f Solution Created 2026-10-03 Updated 2026-10-06
The requested conclusion is false for the printed parameter values. They give and . Substituting in the Bayes factor yieldsThus the Bayes factor favours by about to one, not . Nor does the conclusion hold for arbitrary large : both parameters enter the expression explicitly. With , taking a much wider alternative, for example , would instead give . That is a different prior assumption and cannot repair the printed calculation silently.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 3 g Solution Created 2026-10-03 Updated 2026-10-06
With equal model prior probabilities, Bayes factor updating gives and . The Bayesian model averaging posterior density is thereforeThis is a two-component mixture model of the normal distributions already derived. For the numerical observation above, and . Consequently it is predominantly the wide-model posterior, not predominantly the narrow one.
Past exam of the mathematics course of the University of Cambridge 2022 iii Paper 219 4 b Solution Created 2026-09-28 Updated 2026-10-14
Under , Bayes' theorem at the nested value givesSeparability of the prior and equality of the priors implyRearranging proves the Savage-Dickey density ratiowhich is the Bayes factor in favor of the nested model.
Poisson mean equality model comparison 2026-10-07
Compare independent Poisson means with one shared mean under proper shape-rate gamma distribution priors. Adding the second mean as an inactive parameter under the shared-mean model gives a simple identity model switch. With equal model priors and identical active/inactive priors, its ratio from separate to shared means is . Poisson-gamma conjugacy supplies exact within-model updates, and integrating the gamma kernels supplies an independent Bayes factor benchmark.
Posterior odds 2026-10-14
For two exhaustive mutually exclusive models, posterior odds are the ratio of their posterior probabilities. Bayes' theorem givesThe second factor is the Bayes factor, formed from model prior predictive distributions. Evidence favouring one model need not make that model's posterior probability exceed one half if its prior probability was sufficiently small.