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.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 31 4 b Solution Created 2026-10-03 Updated 2026-10-06
Conditional on , summing the individual independent Poisson counts gives . The between-year conditional independence makes the likelihood functionMultiplying by the gamma distribution prior density, proportional to , gives the Poisson-gamma conjugacy with unequal exposures:For an action , the posterior squared-error loss decomposes asHence the Bayes estimator under squared error loss is the posterior mean, givingFuture counts are independent of the observed years conditional on , so the law of total expectation then gives the posterior predictive expected countThe Bayesian and credibility estimates coincide exactly. This exact Bühlmann–Straub credibility for Poisson-gamma counts occurs because the posterior mean is already affine in the exposure-weighted experience, and therefore belongs to the class over which the credibility estimate minimizes mean squared error.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 34 3 Solution Created 2026-10-03 Updated 2026-10-06
For fixed-design nonparametric regression, let and . The degree- local polynomial estimator takes the fitted intercept , whereUse a nonnegative regression kernel and an invertible local polynomial Gram matrix to obtain a unique fit. For , solving the single weighted least squares normal equation gives the local constant estimator:At the interior point , use the standard unit-integral regression kernel convention . Otherwise the leading variance below is ; unlike a kernel density estimator, the local constant estimator itself is unchanged by rescaling .
The local constant estimator is a linear estimator in nonparametric regression with weights . The independent unit-variance errors implyTo control the bias of an estimator, differentiability at this one point is enough. WriteSymmetry makes , and the supplied moment approximation gives . Therefore the linear contribution to the bias of an estimator is . The remaining contribution has absolute value at most , because only receive positive weight. This is the interior first-order bias cancellation for local constant regression, and gives squared bias of an estimator . Combining with the variance provesFor fixed , take . It satisfies both asymptotic smoothing bandwidth conditions, and the displayed remainder, multiplied by , tends to zero for this fixed . ThusLetting proves the optimized scaled pointwise error tends to zero. The order of these limits matters: no remainder uniform in has been assumed.
For the lower bound over the whole function class, the absence of a uniform bound on derivatives permits a particularly direct argument. It also avoids assuming a normal distribution for errors when the model only supplies their first two moments. Fix and . Choose a smooth bump function on the interval, with , whose support contains no design point except possibly . Such a bump exists because the design is finite; at an endpoint use the restriction of a smooth bump on the real line. Every , , belongs to the differentiability class.
If is not a design point, all observation means are zero for every . The Le Cam two-point lemma applied to has total variation distance zero and gives a lower bound tending to infinity with . In fact, the supremum of the mean squared error is infinite at every such .
If is a design point, only its response depends on . The resulting location family is the single observation ; all remaining observations are independent of and give no extra information. The single-observation location minimax bound isHere is a proof covering discrete as well as continuous errors. Give the prior distribution , independently of the noise. Put and . Consider an easier experiment in which an oracle also reveals whether , and reveals itself on the complementary event. On the event and , every possible truncated noise value places within . The flat prior distribution then makes the Bayesian posterior noise law exactly its truncated original law. The smallest conditional squared-error loss is its conditional variance , attained by the posterior mean.
The probability of that event is at least for , by restricting further to . Thus every rule's supremum risk function is at least the original Bayes risk, which is at least the easier experiment's Bayes risk, and therefore at least . Let and then . Finite second moment and zero mean give . The rule has constant mean squared error one, proving the equality.
Consequently, at every , the unrestricted differentiability class satisfies the stronger conclusionThus works for every . There is no conflict with the preceding fixed-function limit: the worst functions, including arbitrarily narrow bumps, can vary with . This is the pointwise versus uniform risk distinction. A smoothness ball with a common derivative bound would pose a different minimax risk problem.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 1 c Solution Created 2026-10-03 Updated 2026-10-06
By Poisson-gamma conjugacy, the posterior density is proportional toThus the shape-rate posterior isIts posterior mean is and its variance is . The parameter is a rate, rather than a scale.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 1 e Solution Created 2026-10-03 Updated 2026-10-06
The posterior predictive probability averages the conditional probability over the Bayesian posterior. Using its gamma distribution density,For fixed and ,Consequently , and both tend to . This is reasonable because the posterior mean tends to the observed rate and the posterior variance tends to zero. Averaging then approaches evaluating it at the estimated rate: with abundant observations, predictive uncertainty about the rate vanishes.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 1 h Solution Created 2026-10-03 Updated 2026-10-06
A uniform prior on makes the posterior density proportional to the Poisson change-point posterior likelihood above. The zeros trick introduces an observed zero with Poisson distribution mean , making its likelihood function equal to . Choose ; since , this mean is strictly positive. Rough BUGS code, with For , omit the array and set
zero=0 supplied as data, ismodel {
theta ~ dunif(0,T)
for (i in 1:n) {
before[i] <- step(theta-time[i])
}
j <- sum(before[])
logL <- theta-2*T+(n-j)*log(2)
zero ~ dpois(K-logL)
}j <- 0. Monitor the sampled theta to obtain its posterior mean, credible interval and interval probabilities.There is also an exact sampling method. On the posterior density is proportional to , so choose the interval with weightsThen draw from a uniform distribution on and set . These weighted interval draws sample the posterior directly, without asking a local Markov chain Monte Carlo update to cross its discontinuities.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 2 c Solution Created 2026-10-03 Updated 2026-10-06
Independent Jeffreys priors and the two independent binomial distribution likelihood factors give, by Beta-binomial conjugacy,The Bayesian posteriors remain independent because each observation factor involves only its own probability. Their posterior means are respectively and . Notice that is the probability of saying milk first when tea was first, rather than the probability of a correct tea identification.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 2 d Solution Created 2026-10-03 Updated 2026-10-14
In Markov chain Monte Carlo, retain the derived quantity at every iteration. Rough BUGS code using the actual observations isSupply
model {
pM ~ dbeta(0.5,0.5)
pT ~ dbeta(0.5,0.5)
milkAnswers ~ dbin(pM,4)
teaAnswers ~ dbin(pT,4)
delta <- pM-pT
positive <- step(delta)
}milkAnswers=3 and teaAnswers=1. Summarize delta by its posterior mean, empirical quantiles and credible interval; the average of positive estimates . Here . Check Markov chain Monte Carlo convergence diagnostics before interpreting the simulation. Since both Bayesian posteriors are independent known beta distributions, direct independent sampling is an equally valid, simpler way to obtain the same summaries. Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 3 b Solution Created 2026-10-03 Updated 2026-10-14
Let , and . These are the two prior precision parameters. Completing the square in gives the normal-normal conjugacy updateThus the posterior mean is a precision-weighted average of the observed mean and the prior center zero. The posterior variance is the reciprocal of the total precision.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 3 e Solution Created 2026-10-03 Updated 2026-10-14
Under the point hypothesis , the test statistic has a standard normal distribution. The observed statistic is three, giving a two-sided p-value . This is conventionally strong evidence against that point hypothesis. The narrow model is a continuous prior distribution around zero, rather than a point hypothesis.
For and , normal-normal conjugacy givesThe narrow-model posterior mean is strongly pulled toward zero and its standard deviation is about . The wide-model posterior mean is about , very close to the observation, with standard deviation about . Each model produces a markedly different posterior, so choosing between them requires their predictive evidence.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 3 h Solution Created 2026-10-03 Updated 2026-10-06
Put . The posterior mean of the Gaussian practical-null mixture isNear zero, , so the narrow component has high posterior probability and is small when . This pulls the Bayesian model averaging posterior toward zero. For the given ratios, writing givesThus the order statement alone does not guarantee strong pull toward zero: already has the opposite model preference.
As grows, makes , and the mixture model approaches . Its center is exactly , and approximately only for a sufficiently diffuse wide prior, meaning . Here , so the relative displacement is about one percent. Large observations alone do not remove this finite-prior shrinkage.
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 34 4 Solution Created 2026-10-03 Updated 2026-10-06
In the Bühlmann model, a latent risk parameter is drawn from a population distribution. Conditional on , the yearly observations are independent and identically distributed random variables, with conditional expectation and conditional variance . Define the structural parametersHere is the expected process variance, while is the variance of hypothetical means. The Bühlmann credibility premium is the best affine estimate of from the observed claims, under mean squared error. Predicting the next claim gives the same affine estimate: the extra conditional observation noise contributes the constant to the prediction error.
The law of total variance and conditional independence giveAn affine estimate can be written as : for any chosen , optimizing the constant makes its expected value equal to . The normal equations for the linear least-squares projection areFor they force all to agree, with . Thus the credibility factor and premium areThe credibility factor increases with the observation count and between-risk variance, and decreases with within-risk variance. If , the risk mean is known and ; if and , one observation reveals it and . If both vanish, the premium is the fixed value and the factor is immaterial.
In the specified model, the conditional law is a gamma distribution with shape and scale . ThereforeThe prior is an inverse-gamma distribution with shape and scale . To obtain its moments directly, substitute in the defining integral, obtainingThe Gamma function recurrence yieldsThe assumption makes both structural variances finite. HenceIt follows that the model-specific credibility estimate is
For the Bayes estimator under squared error loss, the quantity to estimate is , so the optimum is its posterior mean. The likelihood function, viewed as a function of , is proportional toMultiplication by the prior shows gamma scale inverse-gamma conjugacy:Although the printed hint only mentions integer shapes, the same substitution and Gamma integral normalize this posterior for every positive real shape, so no integrality of is needed. Its posterior mean gives the Bayesian estimate and comparisonThis exact Bühlmann credibility for gamma claims holds for every observed sample, not merely on average. Here the posterior mean is affine in the sample mean, so the best affine Bühlmann credibility premium is also the unrestricted Bayes estimator under squared error loss.
Past exam of the mathematics course of the University of Cambridge 2015 ii Paper 2 25J iii Solution Created 2026-09-24 Updated 2026-10-06
Put . The posterior is , andThe denominator is positive for . For , both parameters exceed one and the mode simplifies to . For this is the uniform-prior mode, exactly ; for the endpoint or symmetric cases also make the mode rule coincide with . Otherwise it is generally a different rule. The posterior mean agrees with only at .
To find the minimax estimator under quadratic loss, consider the posterior mean . Its risk function isFor , the numerator is identically , soThis constant-risk binomial proportion estimator is the unique Bayes estimator for its proper beta prior under quadratic loss. A competing rule's maximum risk is at least its risk averaged over that prior, which is at least this Bayes risk. The constant-risk rule attains the bound, so the posterior mean in (iii) is the unique minimax rule. Consequently any coincident rule is minimax too: the mean in (i) is the same rule when , and the mean in (ii) is the same rule when . No posterior mode listed here equals that mean rule for every observation, since at its value is positive whereas their endpoint modes differ from it. This accounts for the small- coincidences as well as the general answer.
Past exam of the mathematics course of the University of Cambridge 2015 ii Paper 2 25J Solution Created 2026-10-06 Updated 2026-10-14
For , the binomial log-likelihood is plus a constant. Its maximizer, including endpoints, is . For , the Fisher information isThis follows either from the expected negative second derivative or the variance of . At the usual regular score formula does not apply; the interior information diverges as an endpoint is approached.
For a symmetric beta distribution prior , conjugacy gives , with posterior mean . All three priors below are instances of this calculation.
Past exam of the mathematics course of the University of Cambridge 2016 ib Paper 3 20H c Solution Created 2026-09-24 Updated 2026-10-06
The specified gamma distribution uses shape and rate . Multiplying its density by the Poisson likelihood gives a posterior density proportional to . Thus the conjugate prior calculation givesFor squared-error loss, the posterior expected loss isIt is minimized at the posterior mean, so the Bayes estimator isFor a fresh conditionally independent Poisson observation, the posterior predictive probability of zero is the posterior expectation of . Evaluating the gamma integral givesThe samples are independent conditional on ; integrating out the uncertain common parameter produces the predictive probability above.