Past exam of the mathematics course of the University of Cambridge 2019 ib Paper 2 8H c Solution Created 2026-09-24 Updated 2026-09-29
For any action , decompose the posterior expected quadratic loss around the posterior mean:The unique minimizer is therefore the Bayes estimator under squared error loss. Using the mean of the posterior Beta distribution givesUnder repeated sampling at parameter value , has the binomial distribution with expected value . Consequentlyso its bias of an estimator is .
Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 207 1 b Solution Created 2026-10-03 Updated 2026-10-14
Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 207 1 d Solution Created 2026-10-03 Updated 2026-10-14
By Bayes' theorem, with respect to Lebesgue measure on ,The omitted constant includes the binomial coefficient and the normalizing constant of the beta distribution; the uniform prior contributes only the support indicator.
Past exam of the mathematics course of the University of Cambridge 2021 ib Paper 4 17H c Solution Created 2026-09-24 Updated 2026-09-25
The uniform prior is the Beta distribution . By Beta-binomial conjugacy, after observing heads the posterior isThe Bayes estimator under squared error loss is the posterior mean, hence
Past exam of the mathematics course of the University of Cambridge 2022 ib Paper 1 18H b Solution Created 2026-09-24 Updated 2026-09-25
The probability of no recovery through month is the product of the conditional survival probabilities, soUnder quadratic loss, the Bayes estimator is the posterior mean. Posterior independence and the mean of a Beta distribution giveConsequently
The probability density function is the derivative of the cumulative distribution function:It is nonnegative and has integral . This is a beta distribution with parameters and .
By continuity of the cumulative distribution function and nonnegativity, ; strict increase and allow inversion for every . The probability integral transform follows fromThus is uniformly distributed on .
The order statistics arrange the sample increasingly: . Strict monotonicity means is the th order statistic of independent uniform variables. Its density isobtained by choosing the observations below and the above it. This is the beta distribution with parameters , soFor the given log-logistic distribution, rearrangement givesConsequently plot vertically against horizontally. Under a good fit, replacing by its plotting position gives an approximate straight line withThis is a diagnostic probability plot, rather than an assertion that the expectation of the nonlinear transformed order statistic equals that transformed plotting position. Positive observations occur almost surely under the model.
Let . The Bernoulli distribution likelihood is proportional to . Multiplication by the beta distribution prior givesNormalizing with the beta function therefore givesThe parameters remain positive. This is Beta-binomial conjugacy: successes add to the first shape parameter and failures to the second.
Let denote the distribution function of the posterior beta distribution, with and . This distribution is continuous with positive density on . Its equal-tailed credible interval isCompute the two quantiles by solving and . Each excluded tail has mass , leaving posterior mass between the endpoints.
Past exam of the random matrix theory course of the University of Oxford 2025 3 a ii Solution 2026-10-25
The difference of the two eigenvalues is , hence . Its expectation isFor , put . The set of angles satisfying consists of , and , of total length . Thus the full cumulative distribution function isDifferentiating on gives the probability density functionThis is the arcsine distribution, equivalently the beta distribution with both parameters . It has no atoms at either endpoint.
Assume and a current state with , . The unnormalized posterior density isThus the log-posterior, up to an additive constant, is the log-likelihood plus the beta distribution and exponential distribution log prior densities. The exponential distribution rate is , since is its mean. [ref]
https://stat.ethz.ch/R-manual/R-devel/library/stats/html/Beta.html. Official R documentation: dbeta arguments and logarithmic density output
[ref]https://stat.ethz.ch/R-manual/R-devel/library/stats/html/Exponential.html. Official R documentation: dexp rate parameter and mean equal to inverse rate
Choose a symmetric joint random-walk Metropolis algorithm proposal: and , for independent standard normal distribution draws. Its scale depends only on fixed hyperparameters, so forward and reverse proposal probability density functions agree. Reject immediately outside ; otherwise accept with Metropolis–Hastings acceptance probabilityThe following function makes exactly one proposal, with rejection retaining both old parameters:
MHstep <- function(x, p, beta, a, b, mu) {
p_new <- rnorm(1, mean = p, sd = 0.1)
beta_new <- rnorm(1, mean = beta, sd = mu / 2)
if (p_new <= 0 || p_new >= 1 || beta_new <= 0)
return(list(p = p, theta = beta))
logpost <- function(pp, bb) {
ll_f(pp, bb, x) + dbeta(pp, a, b, log = TRUE) +
dexp(bb, rate = 1 / mu, log = TRUE)
}
logA <- logpost(p_new, beta_new) - logpost(p, beta)
if (log(runif(1)) <= min(0, logA)) {
p <- p_new
beta <- beta_new
}
list(p = p, theta = beta)
}The returned field
theta contains the updated value of beta. The original PDF really asks for p and theta, although no parameter is defined in this question. This choice preserves its literal interface while making the intended second parameter explicit. A caller therefore advances with state <- MHstep(x, p, beta, a, b, mu), p <- state$p, and beta <- state$theta.The proposal is an unrestricted symmetric normal distribution followed by rejection outside the support. Repeatedly drawing until a valid proposal appears would instead truncate and renormalize the proposal, requiring a proposal-density correction. The code uses immediate rejection and needs no such correction. The displayed scales are valid fixed choices; practical efficiency can be improved using a separate tuning phase.
For odd sample size, the sample median is the central order statistic, . Since , its index is and . Substitute these into the expectation and variance formulas from part (i):In fact has the symmetric beta distribution , explaining why its expectation is exactly the centre of the interval.
The given probability density function is that of a beta distribution with parameters and . We can derive the required moments directly rather than assuming the beta moment formulas. For an integer , the Euler beta function givesHere for positive integers ; this identity also follows by repeated integration by parts. Taking yieldsSubtract the square of the first moment from the second to obtain the variance:These are exact finite-sample identities for each uniform order statistic.
Let . The Bernoulli distribution likelihood function is . Multiplication by the beta distribution prior density and Bayes' theorem giveRecognizing the normalized beta distribution,This is Beta-binomial conjugacy; the same update applies whether the data are recorded as the individual Bernoulli trials or their success count.
Put and as in part (a), and let be the cumulative distribution function of the beta distribution . The two endpoint equations areThe first equation fixes the posterior probability, and the second makes the two endpoint posterior densities equal. Their admissible ordering isTo justify sufficiency and uniqueness, the derivative of the logarithm of the posterior density iswhich is positive below and negative above it. Thus the posterior density increases strictly to its unique mode and decreases strictly thereafter, vanishing at both ends. Each density threshold between zero and the maximum determines exactly one endpoint on each side of . The probability between these endpoints decreases continuously and strictly from one to zero as increases, so exactly one threshold gives 0.95. This is the beta highest posterior density endpoint characterization.
For the beta distribution with parameters , the Euler beta function gives . Its probability density function is therefore on . Direct integration gives the raw momentsIn particular, its mean is . Equating this to the sample mean and rearranging givesThe observations lie strictly between zero and one with probability one, so and this method of moments estimator is well defined and positive. This is an instance of estimation of a beta shape parameter.
A likelihood-ratio test rejects for small . The derivative of the natural logarithm of its variable factor isThus increases up to and decreases thereafter, tending to zero at both endpoints. Every nontrivial lower level set of therefore consists of two tails. For a prescribed test size , the exact critical region isWriting for the cumulative distribution function of the beta distribution with parameters , the required two equations areThe first makes both cutoffs have the same likelihood ratio; the second calibrates the null hypothesis rejection probability. Equivalently, the second left-hand side isAs the common likelihood ratio threshold increases from zero to one, this probability increases continuously and strictly from zero to one; hence the equations determine unique cutoffs. The two tail probabilities need not each equal when . Exact calibration holds for every common rate because the given null distribution of is independent of that rate. Boundary equalities have zero probability.
Set and . Conditional independence of the binomial distribution observations gives the likelihood functionThe prior distribution is the beta distribution with parameters . By Bayes' theorem, multiplying the prior density by the likelihood function gives a posterior density proportional toRecognizing and normalizing this beta distribution givesfor . This is Beta-binomial conjugacy; the original binomial coefficients cancel in the normalization because they are independent of .
For , decreasing the second parameter by one gives another valid beta distribution density andNormalization therefore givesThe restriction is essential for this finite expected value; when , the singularity near instead makes the expectation infinite.
Multiplying the beta distribution density by gives a constant multiple of the normalized density with parameters :Integrating and using the fact that the latter probability density function integrates to one givesThis is a normalization-ratio argument, requiring no explicit integration of the polynomial density.