Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 112 3 ii Solution Created 2026-10-03 Updated 2026-10-06
Interpret as the length of a shortest Euclidean travelling salesman tour, and take the points to be independent random variables with the uniform distribution on the square. We assume ; a closed tour on one point has length zero, so the printed lower bound would be false for . For two points the closed tour traverses the joining segment twice.
For the deterministic upper bound, use the following precise geometric result, the squared edge bound for tours in the unit square: every finite set of points in admits a cyclic ordering such thatHere is a proof of that geometric result. First consider a right triangle with hypotenuse endpoints , hypotenuse length , and right-angle vertex . The quadratic path bound in a right triangle supplies a path from to through any finite set inside the triangle whose sum of squared edge lengths is at most . For an empty set use the edge . For a single point , use : the triangle lies in the disk with diameter , so and the law of cosines gives .
For several points, draw the altitude from to the hypotenuse. It splits the triangle into two smaller right triangles with hypotenuses and . Their squared hypotenuse lengths sum to by the Pythagorean theorem. Repeated altitude subdivision eventually makes every cell small enough to contain at most one of the given distinct points: each child is similar to the original triangle and its diameter contracts by at most the fixed factor . Construct the base-case paths and combine them from the bottom of this finite subdivision tree. The two child paths concatenate at . If is an auxiliary point, delete it by joining its two neighbours directly. Both neighbours lie in the right-angle sector of the parent triangle at , so their angle at is at most . The law of cosines now shows that this shortcut does not increase the sum of squared edge lengths. The combined path still has endpoints and squared cost at most .
One can first put the given points in generic positions, avoiding subdivision boundaries, and then pass to a limit. There are only finitely many possible visiting orders, so a subsequence keeps the same order and its squared cost converges; this also handles coincident locations. No assumption about a minimum separation remains in the result.
Split the square along a diagonal . Apply the triangle result in each half, following one path from to and the other back to . Each half contributes at most . Remove either diagonal endpoint if it was auxiliary. At a square corner all neighbours lie in a sector of angle , so the same squared-cost shortcut applies. This gives the asserted cyclic ordering with total squared cost at most four. It does not assert that the tour minimizing ordinary length itself has this squared-edge property. The Cauchy-Schwarz inequality applied to the tour supplied by the theorem provesThus the upper bound is deterministic, independently of the sampling law.
For the lower bound, put , the nearest neighbour distance at . Both edges incident to in any closed tour have length at least . Summing over vertices and then dividing by two gives . Conditional on , the union bound and the uniform distribution giveBoundary clipping only makes the ball smaller. Apply the layer-cake representation of the expected value, restricting the integral to :Linearity of the expected value now yieldsThe unspecified sampling phrase in the paper must therefore be understood as independent uniform sampling: an arbitrary distribution concentrated in a tiny region cannot satisfy this lower bound.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 204 3 c Solution Created 2026-10-03 Updated 2026-10-06
Use the probability space with the product measure of the uniform distribution on . Its coordinate random variables are independent and identically distributed random variables. Define simultaneously for every parameterFor , the indicator function inequality holds pointwise at every graph vertex. For fixed , each coordinate has the Bernoulli distribution with parameter , and the coordinates are independent because they are functions of distinct independent . Thus every marginal configuration is exactly the required site percolation model. This is a continuum-indexed family of processes, all on one probability space, and is the standard monotone coupling of Bernoulli percolation.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 207 6 b i Solution Created 2026-10-03 Updated 2026-10-06
For administrative censoring with uniform entry, let entry time . Then has the uniform distribution on , where , , and . Its density and survivor function areDividing density by survival and integrating gives the censoring hazard and integrated hazard:The hazard function is undefined once no uncensored individuals remain. As , it diverges like and the cumulative hazard function diverges logarithmically. This reflects the certainty of administrative censoring by the longest possible follow-up time, not dependence of censoring on the event process.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 208 4 a Solution Created 2026-10-03 Updated 2026-10-06
Draw independent uniformly on , and setThis is the Box-Muller transform. The endpoint has probability zero; an implementation should avoid evaluating its logarithm.
For , , so has density . It is independent of the angle, which has a uniform distribution on , and their joint density is . Transforming to Cartesian coordinates divides by the polar-coordinate Jacobian , yieldingThus the outputs are independent random variables with the standard normal distribution, proving the algorithm.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 208 4 b Solution Created 2026-10-03 Updated 2026-10-06
Let , and write for the standard normal distribution density. For importance sampling, choose the proposal density , namely the uniform distribution on the target interval. Its importance sampling weight isFor iid uniform draws ,is an unbiased estimator of the target mean, since its expectation integrates . If one chooses not to evaluate , the self-normalized importance sampling alternative has statistical consistency, but generally is not an unbiased estimator.
Alternatively, draw independent random variables with the standard normal distribution, let and , and useConditionally on , the retained draws are iid from the truncated normal distribution, so their average is an unbiased estimator with variance , where is its variance. If the ratio is undefined; one can continue drawing until a prescribed number of retained observations is obtained.
Here importance sampling uses every draw inside the interval, whereas only of the normal proposals are retained. The advantage can also be quantified. Integration using givesFor uniform importance sampling,For the retained-draw ratio with a fixed total proposal budget, its asymptotic variance coefficient is . Thus this importance choice has substantially smaller error for the same proposal count; it also avoids wasting about two thirds of the standard normal distribution draws. This comparison is specific to this well-matched importance sampling proposal; arbitrary proposal choices do not share this guarantee.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 208 5 c Solution Created 2026-10-03 Updated 2026-10-06
On , the exponential proposal is the proper density ; its integral is . The word “improper” in the question is therefore not applicable on its stated positive support.
The target-to-proposal ratio isIts maximum occurs at , so the smallest valid envelope constant isOne implementation draws and accepts it when , for independent random variables with the uniform distribution on . Accepted observations have the positive half-normal density by the usual rejection sampling calculation.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 212 6 Solution Created 2026-10-03 Updated 2026-10-06
Use the standard risk-neutral quasilinear utility model: utility is value received minus payment. A bidder may abstain for utility zero, payments to the seller are nonnegative, and the zero-value type has utility zero. The last normalization is necessary for the requested revenue formula; if arbitrary subsidies were allowed, an additive payment constant would remain undetermined. The independent private values model is symmetric, and each bidder has a unit-demand valuation in the two-item part. Participation satisfies individual rationality.
Let be the interim probability of receiving an item and the interim expected payment of a type . Write . By mimicking the Bayesian Nash equilibrium bid of a type , a type could obtain utility . Equilibrium therefore gives, for ,The lower inequality uses type 's incentive constraint, and the upper uses type 's. Since is continuous in these auctions, the inequalities give . With ,This is the interim payment identity underlying revenue equivalence.
For one item, independence and the uniform distribution give : all other values must be below . Hence the expected payment from a bidder conditional on its value isThis is an unconditional-in-winning interim payment, not the amount paid conditional on winning. In the first-price sealed-bid auction, , so the Bayesian Nash equilibrium bid iswith . For , the seller's revenue is zero and a zero bid suffices under the stipulated allocation rule.
For two items and three unit-demand bidders, a type wins if at most one of the other two values exceeds it. ThereforeThe interim payment identity gives . Dividing by the winning probability gives the symmetric Bayesian Nash equilibrium bidTo check that this is an Bayesian Nash equilibrium rather than just a necessary formula, its derivative is , positive for . A type mimicking a type receives utility , whose derivative in is . It is positive before and negative after it, so the truthful type-matching bid is globally optimal. Bids above the highest Bayesian Nash equilibrium bid can only increase payment without increasing the winning probability; the usual nonnegative bid range covers the lower boundary.
By symmetry and the law of total expectation, the seller's expected two-item revenue isFor one item and the same three bidders,More generally the single-item revenue with bidders is . Allocating a second item lowers competition enough that it adds no expected revenue in this particular three-bidder uniform model.
The final mechanism is a direct revelation mechanism because the message submitted by bidder is its valuation report, in the same type space , and allocation and payment are explicit functions of those reports. It is the Clarke pivot mechanism for selecting two unit-demand winners. Truthful reporting is a dominant strategy: bidder 's utility equals its true allocation value plus the other bidders' reported allocation values, minus a term depending only on the others' reports. Reporting its true value makes the efficient allocation maximize the first two terms, while the last is unaffected by its report.
Let the ordered values be . For a winner , the maximum welfare achievable by the other two bidders is their combined value; in the actual allocation only the other winner receives an item. Thus the difference defining its payment is the excluded bidder's value . For the loser, both other bidders receive items already, so its payment is zero. Consequently both winners pay the lowest valuation, andThis equals the first-price sealed-bid auction revenue above. A conditional check gives the same interim payment identity: the minimum of the other two values has density , and bidder wins exactly when that minimum is below . Its conditional expected pivot payment is . The mechanisms have equal expected revenue, even though their realized payments need not coincide.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 322 1 Created 2026-10-03 Updated 2026-10-06
Let and let denote present stellar age, rather than time measured from the galaxy's birth. With a fixed initial mass function, constant star formation rate also gives a constant number of births per unit time, as in the birth-age distribution under constant star formation. Counting the supplied stellar evolution model's remnants as part of the population, ages have a uniform distribution on . Integrating the constant birth rate therefore givesOutside this interval the cumulative fraction is zero or one as appropriate.
Write for the birth-mass parameter and . The normalization cancels when integrating the initial mass function:Thus the mass-tail fraction isIt is one at and below the lower cutoff. The normalization constant has no effect on any number fraction.
For evolutionary-state selection by stellar lifetimes, a red giant has completed its main sequence lifetime but not its giant lifetime. Its stellar lifetime regions in a mass-age diagram are bounded byThe lower boundary meets at and the upper boundary meets it at . A white dwarf lies above the upper lifetime curve, within the same age interval.
The probability integral transform, applied to the decreasing mass-tail coordinate, makes uniform on : . The independent birth age gives uniform on , so number fractions are areas in a unit square. Since , the red giant region becomes , a triangle with vertices , and . Its area is . The white dwarf region is a triangle of area . Hence the present individual-star fractions areThe rest are on the main sequence under the given toy lifetime model.
For the binary stars, draw two independent mass-tail coordinates , but only one shared age coordinate : components born together are coeval. The coeval binary population therefore occupies a uniform unit cube . At a fixed age , the state probabilities for either component areTheir evolutionary states have conditional independence given . They generally do not have unconditional independence, because sharing an age correlates their states. The binary fractions below are slice areas averaged over .
Past exam of the mathematics course of the University of Cambridge 2017 ib Paper 2 8H c Solution Created 2026-09-24 Updated 2026-10-05
Let and be the order statistics. For the symmetric uniform distribution, each observation is above or below with probability , independently. ThusSo is an exact 50% confidence interval.
The observed interval contains values impossible under the sampling model. Both observations must lie within one unit of the parameter, so the interval of all compatible values is . It contains the true parameter almost surely. A support-restricted confidence interval for a uniform location parameter can therefore reportMore precisely, the procedure retains exact 50% unconditional coverage, since the second interval contains almost surely. The intersection is a nonempty interval for every sample in the model and equals for these data. Reporting the full compatible interval alone is also valid and has coverage one. On this sample's large-spread event it lies wholly between the observations; this does not turn the unconditional 50% procedure into a generally 100% procedure.
Past exam of the mathematics course of the University of Cambridge 2017 ib Paper 4 19H b Solution Created 2026-09-24 Updated 2026-10-05
Under the null hypothesis , has the uniform distribution on . Against , the likelihood ratio is , increasing on that interval. The Neyman-Pearson lemma therefore givesThe size of a statistical test is , and there is no boundary randomisation issue for this continuous probability distribution. Its statistical power against is .
For every admissible alternative , the likelihood ratio is strictly increasing. The same upper-tail rejection set has size and is a most powerful test against each fixed such alternative, again by the Neyman-Pearson lemma. Hence the same test is a uniformly most powerful test against , where the alternative is understood within the specified parameter range. Its full power function isFor or , the never-reject or always-reject test supplies the respective endpoint case.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 210 2 Solution Created 2026-10-03 Updated 2026-10-05
Choose a Borel measurable function version of the posterior success probability . Conditional on , predicting zero has error probability and predicting one has error probability . A Bayes classifier for zero-one loss is thereforeEither decision is optimal when . The displayed Bayes risk also equals and is unaffected by changing on a -null set.
For any measurable set , independence and the uniform distribution of giveLikewise the probability with label zero is . These sets determine the joint probability distribution, soThe same construction makes all training pairs independent and identically distributed random variables.
Fix a feature-measurable nearest-neighbour tie-breaking rule, for example increasing original index for observations at equal Euclidean norm distance from the query. This is important: the ordering may depend on the features, but not on the or labels. Let be the label attached to the th ordered feature. The classifier from the K-nearest neighbors algorithm isThe displayed rule resolves a tied vote in favour of one; any fixed vote convention would also define the method. When , this is the one-nearest-neighbour classifier .
Write for the selected original index. Conditional on all features , it is fixed, and is still uniform on . The two decisions being compared areThe latter is an oracle comparison rule: its relabeling is recomputed at each query , rather than being a fixed relabeling of the training data for all queries. For a variable with the uniform distribution on , the two threshold indicators at differ exactly when lies between them, an interval of length . This Bernoulli coupling by a shared uniform random variable proves
Take the test pair independent of the training data and its auxiliary uniforms. Let , and interpret as conditional misclassification risk given . The tower property of conditional expectation gives . Conditional on the test feature and all training features, and are independent variables with a Bernoulli distribution of parameter . Consequently, for every ,This is an exact finite-sample equality, not merely a limit.
The two error indicators can differ only if the two classifiers disagree, soThe permitted nearest-neighbour approximation theorem states that the last expected value tends to zero for the feature-based selection rule. This establishes the one-nearest-neighbour asymptotic risk
For , put . Then , and . Integrating gives the Bayes risk bound for one-nearest-neighbour classificationThus a one-nearest-neighbour classifier need not achieve the Bayes risk: for constant , its limiting misclassification risk is , while .
Feature-based neighbour tie-breaking is required. The convention cannot be dropped for arbitrary . For a counterexample, take almost surely and constant , and choose among the coincident neighbours the one with the smallest . Then the predicted label is one with probability , so its misclassification risk tends to , exceeding the claimed upper bound . The corrected theorem uses ties determined independently of the uniforms and labels, as above.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 214 2 a Solution Created 2026-10-03 Updated 2026-10-06
Use the nearest-neighbour lattice graph with graph vertex set : an unordered pair is an edge precisely when . A bond configuration is ; under the product measure , its edge coordinates are independent Bernoulli distribution with success probability . Edges with coordinate one are open. The open cluster is the connected component of a graph reachable from the origin through open edges.
Define the percolation probability and percolation critical probability byEquivalently, . The monotone coupling of Bernoulli percolation proves the equivalence: assign independent uniform distribution to the edges and open at parameter when . Connection events and then increase with . For , and , so the defining set is nonempty. The definition does not settle what happens at .
By translation invariance all roots have the same probability. Since the graph vertex set is countable, implies that no graph vertex lies in an infinite percolation cluster almost surely. Conversely a positive root probability gives positive probability of an infinite percolation cluster, and translation ergodicity of Bernoulli percolation then makes existence an almost-sure event. In question 2(b), means .
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 216 1 b Solution Created 2026-10-03 Updated 2026-10-06
Adaptive rejection sampling is exact rejection sampling for a differentiable log-concave probability density. Given interior evaluation points , construct the upper envelopewhere is the unnormalized target probability density function. The concave function lies below all its tangent lines, so . Interpolation between adjacent evaluation points gives a lower envelope there, allowing a squeeze test. The normalized upper envelope is a piecewise exponential proposal distribution.
Draw and an independent from the uniform distribution, and accept when . A squeeze test can establish acceptance without evaluating . Otherwise evaluate and, whenever it is evaluated, add to the envelope's points. Repeat until acceptance. On each linear piece , its integral is on , with value when . These integrals select a piece; inverse transform sampling samples within it.
Here, with and , the log-posterior on hasChoose evaluation points strictly inside , avoiding any endpoint singularities of the logarithm. Every finite set of tangent lines gives a finite upper-envelope integral on this bounded interval; slope conditions needed for unbounded supports are unnecessary. When the posterior distribution is simply the uniform distribution and may be sampled directly.
For any fixed envelope, proposal times acceptance is proportional to . Conditional on all past evaluations and rejections, the next accepted value therefore has the same normalized posterior density. To see that adaptation does not spoil this, at every attempted draw its accepted mass is a scalar times that fixed posterior density; summing over possible rejection histories preserves it. The acceptance probability stays bounded below by its positive initial-envelope value because insertion only lowers the upper envelope. Thus acceptance occurs almost surely. With fresh independent randomness, successive accepted values are exact independent samples from the posterior distribution, even when the envelope is retained and improved between them.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 216 1 c Solution Created 2026-10-03 Updated 2026-10-06
An exact finite mixture model follows from the binomial theorem:Define positive mixture weightsHere is the Beta function, so the component probability distributions are . All coefficients are computable from the observed integer counts.
Use inverse transform sampling with the supplied to choose : writing and , take . Then recycle its position inside that interval,Recycling a uniform random variable after discrete sampling makes uniform independently of , since . It is also independent of all supplied random variables with gamma distributions. Transform these by the probability integral transform:They are independent random variables with uniform distributions because has a unit-rate exponential distribution.
Conditional on , put and . Form the values and return their th order statistic. This uses at most the supplied random variables with gamma distributions, since . The uniform order statistic formula givesAveraging these component probability density functions with weights recovers exactly the normalized posterior density. Unused inputs can be discarded. When , , , and the output is , as required. Interval endpoints and ties have probability zero; any consistent convention there is harmless. Exactness here concerns the mathematical algorithm; finite-precision arithmetic can be stabilized with logarithmic mixture weights.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 216 3 b Solution Created 2026-10-03 Updated 2026-10-06
Take observation periods to have positive lengths , and let be the Markov kernel of a sweep which first draws given the current and then draws the new vector . Write . Conditional on , independence and the gamma distribution mean and variance giveAveraging over the full conditional distribution of preserves this bound, uniformly in the current state. Therefore . This is the mechanism in bounded conditional moments imply a geometric drift.
Choose , , and . Outside , ; inside , . HenceFor completeness, is a small set, even though it approaches the boundary of the positive orthant. Choose small enough that . On , . The conditional gamma distribution of has fixed shape and rate in a compact positive interval. Its probability density function therefore has a positive common lower bound on . For those , the product probability density function of similarly has a positive common lower bound on , since every shape is positive and every rate lies in a compact positive interval. Integrating over gives on , where is the uniform distribution on and .
The transition probability density function is positive throughout the positive orthant, giving an irreducible Markov chain. Since , the box minorization includes starts in the same box, which gives an aperiodic Markov chain. The proper prior distributions and bounded Poisson distribution likelihood have positive finite evidence, so the invariant posterior distribution is proper. Together with the geometric drift condition, these hypotheses imply geometric ergodicity. In particular, the argument proves the required drift rather than assuming that every Gibbs sampler is geometrically ergodic.
The positive-period convention matters. If zero lengths are allowed, the printed assertion can fail: take , , . Then and , soThis example has a proper posterior distribution but cannot satisfy a finite quadratic geometric drift condition. Thus the proof establishes the intended claim for positive observation periods, not an unrestricted extension to zero exposure.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 216 4 b Solution Created 2026-10-03 Updated 2026-10-06
A counterexample can use an irreducible, aperiodic reversible Markov chain, so failure is not caused by a pathological transition structure. Take two binary coordinates, enumerate the four states as , and let be their uniform distribution. Use the Markov kernelIts rows sum to one and it is symmetric, proving detailed balance with . Every entry is positive. Let the univariate parametric family be .
For a product initial probability distribution with parameters , additivity of the Kullback-Leibler divergence givesEach summand has derivative on , so the unique optimum at has . ThusOn the other hand the allowed initial probability distribution , obtained with , is sent by one step to . Its Kullback-Leibler divergence is zero, the smallest possible value. ConsequentlyThe transition reduces Kullback-Leibler divergence for each input, but may reduce it by different amounts for different inputs. It therefore need not preserve the ordering of competing initial probability distributions, which is exactly why Markov chain variational inference must optimize the initial parameters for its chosen number of steps.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 216 4 c Solution Created 2026-10-03 Updated 2026-10-06
Parameterize the initial product normal distribution by , usingRun the given recursion with independent random variables with uniform distributions to obtain . Because the noise laws do not depend on , the chain rule and automatic differentiation give reparameterization gradients through the entire simulated trajectory. The variational objective is , where and .
One must account for the output differential entropy, not just optimize . Simulation and differentiability of do not themselves supply an evaluable . If retains the reversible Markov chain assumption from part (b), a concrete algorithm avoids a transition-density oracle using reversible density-ratio propagation. Write , with an evaluable unnormalized posterior density, and defineDetailed balance impliesFor example, integrate and replace by to obtain the first identity. This also proves absolute continuity of measures of with respect to when . An everywhere finite differentiable log-posterior has positive density, so an ordinary product normal distribution has this domination.
For each outer sample , independently run trajectories of length starting at , with endpoints . These are reverse trajectories because of detailed balance; the same recursion simulates them. Estimate byAverage over an outer batch. Compute it stably by a logarithmic sum of exponentials. Differentiate through both outer and reverse trajectories and through the explicit product-normal probability density function . Only the given state gradients of and , together with elementary normal-density derivatives, are needed. Apply stochastic gradient descent to and , refreshing the independent noise batches. The logarithmic scale parameters keep all variances positive.
This is nested Monte Carlo optimization of the exact objective in the limit of adequately increasing inner and outer sample sizes. For fixed , is generally biased, even though is an unbiased estimator. Finite logarithmic moments, suitable uniform integrability, and justified differentiation under the integral sign are needed for consistency and gradient interchange. Under those conditions increasing and controlling the optimization error yields a justified numerical approximation; nonconvexity prevents a generic guarantee of a global optimum.
There is a real assumption issue: part (c) redefines without explicitly restating reversibility. The algorithm above uses the reversible interpretation inherited from part (b). For an arbitrary differentiable recursion, one additionally needs access to output densities or a simulatable reverse kernel and regularity of the objective. Differentiability alone is insufficient: is differentiable and, with a standard-normal target, makes a point mass for , so every candidate has infinite Kullback-Leibler divergence. Thus a universal finite-objective algorithm cannot be justified solely from the literal differentiability assumptions. An invertible recursion with computable density transformations offers a different sufficient route, but invertibility is not stated here.
