Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 44 4 g Solution 2026-10-14
Smaller mean Bayesian deviance indicates better average likelihood fit. Model B has the smallest , improving on A by and on C by . Model C has the smallest effective parameter count in DIC, reflecting its shared timing and growth coefficients. Model B's hierarchical covariance parameters and residual flexibility contribute to a larger effective count than C.
Adding fit and complexity gives the reported deviance information criterion: A has , B , and C . Thus DIC favors Model C, whose simpler shape more than compensates for its slightly worse mean fit than B. The differences are modest, and the criteria must use the same observation likelihood and deviance convention. These numbers are not posterior model probabilities; predictive assessment remains useful.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 44 4 h Solution 2026-10-14
Model A has fifteen separate curve parameters plus one error-scale parameter. With such broad priors, one might have expected more of those sixteen parameters to be effectively estimated, rather than , and might also have expected its greater unpooled flexibility to give better fit than the displayed . Model B instead has a smaller mean deviance despite sharing information between trees.
This is a diagnostic concern, not a mathematical impossibility. Effective parameter count in DIC depends on posterior curvature and parameterization, while mean posterior deviance is not minimized deviance. A weakly identified nonlinear asymptote–slope trade-off, skewness, multiple posterior regions or slow Markov chain Monte Carlo mixing could explain the unexpected comparison. For A, the implied deviance at the posterior mean is ; for B it is . Inspect traces, effective sample sizes, independent chains and fitted curves, and extend sampling where needed. Fifty thousand iterations alone do not establish convergence.
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 2010 iii Paper 36 3 d Solution Created 2026-10-03 Updated 2026-10-14
Let and . The usual effective parameter count in DIC isWith the locally flat prior distribution, and the mean of the chi-squared distribution excess is . Thus , while , giving .
More generally, the quadratic posterior deviance moments give the effective count. Within the same approximation, let the posterior covariance matrix be . The expectation of a quadratic form giveswhereas evaluation at omits the trace term. Therefore . For a flat prior, and the trace is ; informative prior shrinkage can reduce this effective count.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 36 3 g Solution Created 2026-10-03 Updated 2026-10-14
The alternative effective count isUnder the locally flat-prior approximation, the constant contributes no variance, and the remaining chi-squared distribution term has variance . Hence , the same calibration as the usual effective parameter count in DIC. It can be estimated by half the sample variance of deviance draws, without evaluating deviance at a parameter average.
This is a calibrated alternative, not a general identity with . For example, with a quadratic deviance and a multivariate normal distribution posterior of mean and covariance , putting givesThey agree when and , but informative priors can change both the covariance and the displacement of the posterior mean. Their equality should therefore not be assumed outside the stated regime.
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 34 1 h Solution Created 2026-10-03 Updated 2026-10-07
Fit two hierarchical Bayesian models to the same observations, one with the bounded uniform distribution sampling density and the other with an exponential distribution density. Specify rate versus mean in the exponential model and assign appropriate, scientifically comparable proper prior distributions; that parameter is no longer a literal maximum size. Obtain posterior distributions, for example by Markov chain Monte Carlo, and check convergence.
At the same observational level in both models use the Bayesian deviance , excluding prior densities. Retain the same likelihood constants and consistently either condition on breed effects or integrate them out. Estimate , evaluate at the posterior mean, and compute the effective parameter count in DIC:Smaller DIC favours the fit–complexity tradeoff. Supplement it with posterior predictive checks; the uniform model's parameter-dependent support and the hierarchical structure make the criterion a diagnostic rather than an automatic definitive decision.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 34 3 e Solution Created 2026-10-03 Updated 2026-10-07
The first coefficient is the posterior mean log odds of choosing invertebrates rather than fish for smaller alligators at Lake Hancock. It corresponds tofor those invertebrate-to-fish odds. This is not the absolute probability of choosing the second category, because the other categories also enter the normalization.
The size coefficient adds to the invertebrate-to-fish log odds on changing to the larger class, holding lake fixed. Its common-across-lakes odds ratio isabout a 78 percent reduction in the relative odds. Exponentiating a posterior mean log odds is a geometric summary, not the arithmetic posterior mean of the odds.
There are free category coefficients plus group intercepts, giving 28 free parameters in the fitted Poisson model. The effective parameter count in DIC, , is close to 28 and slightly smaller, consistent with some regularization or incomplete information. Comparing it with 20 would omit the nuisance intercepts. A direct conditional multinomial fit has 20 coefficients but a different observational likelihood, since it conditions on the totals.
Quadratic posterior deviance moments 2026-10-14
Suppose the Bayesian deviance is locally with positive-definite , and the posterior is normal with mean and covariance . Writing , expectation and variance of the quadratic form giveConsequently the usual effective parameter count in DIC is , whereas half the deviance variance is . A locally flat prior gives and , so both counts equal the parameter dimension. Informative priors generally destroy their equality. The expectation formula requires only the first two moments; normality is used for the variance formula.