Past exam of the mathematics course of the University of Cambridge 2011 ia Paper 2 9F a Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2011 ia Paper 2 9F b Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2012 ia Paper 2 3F Solution Created 2026-09-24 Updated 2026-10-07
For events with , the conditional probability is . Applying the definition in both orders gives Bayes theorem:Conditionally on , independent fair tosses give a binomial distribution for the head count, so . The joint probability mass function is consequentlyUse the law of total probability and the differentiated geometric series, , to obtain . The posterior coin count after exactly one head is thereforeThese probabilities sum to one by the same series identity. The conditioning weights possible coin counts by their likelihood of producing exactly one head.
Past exam of the mathematics course of the University of Cambridge 2013 ia Paper 2 12F a Solution Created 2026-09-24 Updated 2026-10-07
Let mean that the selected coin is biased and that it is fair. Both have prior probability . Conditional on either coin, tosses are independent. For the observed head count, the two binomial distribution likelihoods are and . Bayes theorem cancels the common coefficient and equal prior weights, givingThis applies for , including endpoint coin biases with zero-power factors interpreted by the corresponding likelihood. The fair-coin likelihood is positive, so the denominator cannot vanish.
Past exam of the mathematics course of the University of Cambridge 2013 ia Paper 2 12F b Solution Created 2026-09-24 Updated 2026-10-07
For a finite stopping time with target , necessarily . The last toss must be a head and the preceding tosses must contain heads. The negative binomial stopping argument therefore gives likelihood for the biased coin, and for the fair coin. Applying Bayes theorem again yieldsThe two experiments have different combinatorial coefficients, but each coefficient is independent of the coin parameter. Thus posterior equality for proportional likelihoods explains their identical posterior formula. If , a finite positive-head stopping observation has zero likelihood under the biased coin, consistently giving posterior zero. If the target is , the experiment stops at without a toss and the posterior remains ; a positive stopping time would then be impossible.
Past exam of the mathematics course of the University of Cambridge 2013 ia Paper 2 12F Solution 2026-10-07
By the partition and the law of total probability, . Also . Combining these identities proves Bayes theorem:The assumed positive probabilities make the conditional expressions well defined.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 34 1 b Solution Created 2026-10-03 Updated 2026-10-07
Multiplying the likelihood function by the Pareto distribution prior givesThe integral of this kernel is , so the normalized posterior distribution isThus it is . This proves uniform-Pareto conjugacy: applying Bayes theorem preserves the family of prior distributions.
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-07
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 2013 iii Paper 34 4 e Solution Created 2026-10-03 Updated 2026-10-07
Let be one fixed model indicator with equal prior probabilities, and put . Within each model the parameters are already updated using the same past data. The Bayesian model averaging forecast is . Upon observing , Bayes theorem givesTaking the ratio cancels the denominator and gives the prescribed update because . Iteration yieldsThe weights are posterior model probabilities and their mixture is the full Bayesian predictive density. The indicator is fixed across days, rather than choosing a fresh model independently each morning.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 33 6 b ii Solution Created 2026-10-03 Updated 2026-10-06
Let mean membership in the structural-zero component. Under the fitted zero-inflated Poisson regression, , whereas . By Bayes theorem, the posterior structural-zero probability isUsing the printed predictions for this patient givesThe fitted conditional probability is about . It is larger than the prior fitted structural-zero probability , because observing no episodes increases the probability of latent membership in that component. The interpretation “never at risk” is the model's structural class; an observed six-month zero alone does not identify the class with certainty.
Past exam of the mathematics course of the University of Cambridge 2015 ia Paper 2 12F Solution Created 2026-09-24 Updated 2026-10-06
Interpret random choice of coin as equal prior probabilities, and the tosses as independent conditional on the chosen coin. Let denote two heads. The conditional probabilities are and . For posterior coin selection from repeated tosses, Bayes theorem givesThe tosses need not be unconditionally independent, because the same hidden coin is used twice. If the coin-choice prior were instead , the answer would be ; equal choice gives the stated .
For nondecreasing uniform samples in the lottery, all ordered samples have equal probability by the discrete uniform distribution and independence. A nondecreasing sample is uniquely specified by its multiplicities , with . The stars and bars argument places separators among identical markers, giving multiplicity vectors. There is exactly one nondecreasing ordered sample for each such vector, so the probability isThis counts samples with ties correctly; multiplying a single strictly increasing count by would not handle the repeated values.
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 35 1 c Solution Created 2026-10-03 Updated 2026-10-06
A complete-case analysis changes the mix of people contributing to the logistic regression. Let mean that both required variables are observed, and write . Within , Bayes theorem givesIf completeness depends differently on the two responses, and that selection also varies with partner count or the other predictors, the extra term changes the fitted regression coefficients. For example, people with high counts and poor condom use can be under-represented, weakening or otherwise distorting the apparent association. Dropping people with missing also excludes some whose membership of the target group is unknown.
The fitted conditional association among complete responders need not equal the target-population association. No direction of selection bias follows without specifying the response mechanism. Selection on predictors alone need not bias a correctly specified conditional logistic regression; it is the outcome-related selection described here that removes that reassurance.
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 37 6 i a Solution Created 2026-10-03 Updated 2026-10-06
Use the Bayes theorem to multiply the Ising model prior by the conditionally independent normal likelihood factors. For fixed observed , the posterior distribution isThere is no boundary wraparound: the neighbor sets use only actual horizontal and vertical edges inside the square. Each unordered edge is counted once. In particular, the prior retains the printed minus sign in front of , and the likelihood retains the seventh power. The finite state space and finite observed values make every posterior weight positive and finite, with a finite positive normalizing sum.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 206 1 f Solution 2026-10-05
For EM for zero-inflated negative binomial regression, at iteration apply Bayes theorem to each zero in the zero-inflated negative binomial model. The E step computes the conditional expectation of its latent indicator:Treating these values as fixed, the M step maximizes the expected complete-data log-likelihood. Its two parameter blocks separate:The second block is a weighted negative binomial regression with fixed size . Writing and , its parameter-dependent objective isIts score function and negative Hessian matrix areThe objective is concave, so a finite maximizer, when it exists, can be found by Newton method or iteratively reweighted least squares. The latter uses working response and weights . This is not an unweighted regression on only the positive counts: zeros retain fractional weight in the count component.
Start with and finite coefficients, alternate the two steps, and monitor the observed log-likelihood. Exact maximization makes the expectation-maximization algorithm nondecreasing in that likelihood, although the mixture may have multiple stationary points. All-zero data can lead to boundary fits and poor identification; multiple initializations and explicit checks for boundary parameters are useful.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 207 2 b iii Solution Created 2026-10-03 Updated 2026-10-05
Let contain independent complete observations of the -dimensional vector, and let be a Directed acyclic graph. A Gaussian Bayesian network uses, for node ,Here is an intercept, the vector of parent coefficients, and the conditional variance; the vector collects these statistical parameters. Its likelihood function factors asChoose a proper statistical parameter prior distribution and a graph prior distribution . Bayes theorem gives the Bayesian network structure score, up to the normalization common to graphs,The integral is Bayesian model evidence: it averages over nuisance parameters rather than substituting their best-fitting values. A graph prior can favor sparse graphs, while the evidence balances fit against the amount of prior statistical parameter space that predicts the observations well. Compare these scores over admissible Directed acyclic graphs, using enumeration when feasible or a search procedure otherwise; search need not find a global maximum, and observational data need not identify a unique causal orientation.
A conjugate prior makes the integral analytic. For example, for take , , where is positive-definite matrix and ; these are independent local normal-inverse-gamma priors. Under prior independence between nodes, the evidence is a product of local regression evidences. Each posterior has the same family, so the local integral is the ratio of prior and posterior normalization constants, with the likelihood's constants included. This avoids costly numerical integration and makes local graph updates inexpensive. Hyperparameters must be specified coherently if score equivalence between observationally equivalent graphs is desired; arbitrary local priors do not automatically have that property.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 207 7 b Solution Created 2026-10-03 Updated 2026-10-05
Use Bayes theorem with the individual survivor function. Writing , the frailty distribution among survivors has densityHenceThe conditional expectation starts at one and declines toward zero when . Survival favors the less frail individuals, precisely explaining why the population hazard under exponential frailty equals times a decreasing multiplier. The original PDF asks for conditioning on the event ; the TeX's misplaced inequality is a transcription error, not conditioning on an observed exact event time.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 219 2 ii Solution Created 2026-10-03 Updated 2026-10-05
Let . Bayes theorem and the stated prior factorization give the posterior densityThe normalizing constant, when finite and positive, is the integral of this product over its admissible parameter domain. An improper prior requires checking posterior propriety before interpreting this expression as a probability density.
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 2 30K a Solution Created 2026-09-24 Updated 2026-10-03
At a given time write and , the conditional probability that the next search succeeds if box is chosen. Compare two consecutive searches , keeping the continuation after two failures fixed. Their expected costs up to that common continuation areThe probability of reaching the common continuation is the same in either order. Moreover,Repeated adjacent interchanges move a box with maximal index to the front without increasing expected cost; applying the same argument after every failure proves the optimal index for Bayesian box search policyFor completeness, after an unsuccessful search of box , Bayes theorem gives the posterior in the Bayesian box search problem: