Consider the chosen finite minimization problemOnly adjacent integers are neighbors. At each interior state propose left or right with probability each; at an endpoint propose its sole neighbor with probability and itself with probability . This proposal distribution is symmetric, including at the endpoints. The local minimum at is relative to these allowed moves; is the unique global minimum.
At , improving-only local search rejects both neighbors because and exceed . For simulated annealing, choose , using the natural logarithm. Conditional on proposing from , the acceptance probability isThe one-step transition probability is instead . Both subsequent rightward proposals are downhill, so the conditional probability of the precise next three states being , given and fixed , isThis is one possible escape route, not the probability of eventually reaching . Rejections, excursions toward , and repeated attempts give many other sample paths. The calculation establishes possibility, without claiming a general performance advantage from a selected sample path.
For comparison, halving makes the uphill acceptance probability ; doubling it makes that probability . Cooling makes it harder to leave this local minimum, even though the stationary distribution increasingly favors the global minimum. That tension is the central scheduling problem.
Gaussian autoregressive proposal reversible with respect to a standard normal distribution Created 2026-09-29 Updated 2026-10-05
Let , let , and proposeThe proposal distribution is . If independently of , then is a jointly multivariate normal distribution invariant under exchanging and , because both random vectors have covariance matrix and their cross-covariance matrices are both . Consequently its density satisfieswhere is the standard-normal density. Thus the proposal is reversible with respect to the standard normal distribution.
Orthogonal-mixture Metropolis proposal Created 2026-10-05 Updated 2026-10-06
For a proposal , with isotropic and an independent random orthogonal matrix , invariance of the distribution of under transpose makes the proposal distribution symmetric. Indeed , and averaging the isotropic Gaussian density over an inversion-invariant law yields . The Metropolis–Hastings algorithm therefore accepts with the target density ratio alone.
For a chosen bead, the uniform displacement cube is inversion symmetric, so the proposal distribution satisfies . The target canonical density is for allowed configurations. With ,This proves detailed balance. Overlapping trials have zero target weight and are rejected. The proposal must retain rejected trials as self-transitions; repeatedly proposing until a nonoverlapping move appears would generally introduce a configuration-dependent proposal normalization and need a Hastings correction. Detailed balance establishes stationarity, while sufficient sampling also requires practical exploration of the accessible state space.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 43 3 a iii Solution Created 2026-10-03 Updated 2026-10-14
A valid symmetric proposal distribution is with on the entire real line. Reject immediately if . Otherwise use the positive-parameter random walk with boundary rejection. Withthe Metropolis–Hastings acceptance probability isNo Jacobian determinant is needed for this additive proposal in . Do not repeatedly redraw until : that would create a state-dependent truncated proposal and require an additional Hastings correction. Alternatively a symmetric walk in respects positivity, but then the transformed target has a factor ; equivalently the acceptance ratio in variance coordinates has the extra factor .
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 43 3 a ii Solution Created 2026-10-03 Updated 2026-10-20
Hold all parameters except fixed and propose with . This random-walk Metropolis algorithm has a symmetric proposal distribution. DefineCancellation of unchanged likelihood and prior factors gives the Metropolis–Hastings acceptance probabilityDraw an independent uniform and accept if it is at most ; otherwise retain the old value. Update each component in turn, recomputing the needed mixture contributions. On a logarithmic scale, compare with to avoid numerical underflow.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 43 4 Solution Created 2026-10-03 Updated 2026-10-14
For minimization of an energy , simulated annealing at temperature targets the Boltzmann distribution relative to a specified parameter reference measure. With proposal distribution , accept withAt each temperature run the chain long enough to explore that law, then cool and retain the best state seen. For symmetric proposals every improvement is accepted, while a worsening move is accepted with probability . Equilibrium laws concentrate near global minima when their normalizing integrals are finite and the minima are suitably isolated. A particular rapid cooling schedule does not automatically inherit this guarantee.
Likelihood maximization uses energy , not . The source's later wording “ equal to the log-likelihood” conflicts with its preceding minimization convention. The intended maximum-likelihood Boltzmann distribution is proportional to . With the opposite sign, likelihood maxima would be disfavored; for binomial data with both successes and failures the density often would not even be integrable near the endpoints as decreases.
For the maximum-likelihood estimates, write , and . In the binomial distribution model with known positive integer , the log-likelihood isDifferentiating gives , hence . The second derivative is negative in the interior. If or , the maximum is at the corresponding endpoint. This model requires integer observations in ; otherwise its likelihood is zero.
For the normal distribution model write . Its log-likelihood isFor fixed , the unique maximizing mean is . Substituting it and differentiating in gives , so, assuming ,If , the normal density likelihood grows without bound as with ; there is no finite interior maximum or ordinary finite AIC for that fit.
For Gaussian likelihood Gibbs annealing, use relative to . Completing the square and identifying an inverse-gamma distribution gives the Gibbs sampler conditionalsIntegrating out contributes a factor proportional to , so the marginal is . The joint target is proper for when ; starting the Lebesgue-based annealing above this range would require a proper reference factor or bounded parameter domain. For sufficiently small , its moments satisfyThus equilibrium draws concentrate at as .
There is also a direct convergence proof for the actual successive Gibbs sampler updates here. Choose deterministic with , start at a finite deterministic , draw from the first conditional using , then draw from the second using . Conditional normal moments give and . The permitted inverse-gamma moments therefore yieldThe coefficient on the preceding first moment is at most , and that on the preceding second moment is at most . The remaining coefficients are uniformly bounded, so both moment sequences are bounded by iteration. Since , the recursions then give and . Also . HenceThis proves convergence in mean square, and thus in probability, to the normal maximum-likelihood estimates for this explicit cooling/update scheme, rather than merely assuming equilibration.
For binomial likelihood-power annealing, normalizing on givesIts mean is , and its variance isThe mean tends to and the variance tends to zero, proving concentration at the binomial maximum-likelihood estimate, including the endpoint cases. Independent exact draws from these beta laws are a simple annealing implementation within this model.
For model selection, the Akaike information criterion is with and . ThusUse the endpoint convention . For a trans-dimensional annealing for penalized likelihood construction, target the disjoint model spaces with unnormalized densitiesrelative to and , respectively. The energies are half the unoptimized AIC, ; their joint minimizer is the fitted model with smaller AIC. Keep constants such as and the normal density normalization, which do not cancel across models. The within-model conditional draws are unchanged by these constant penalties.
Here is a complete dimension-changing proposal. Select a binomial-to-normal move with probability and a normal-to-binomial move with probability , both fixed; other steps can use the within-model updates. From , draw with density and setThis bijection from onto has inverse , . Its absolute Jacobian determinant is . The Binomial-normal reversible-jump annealing acceptance ratio is thereforeFor a reverse proposal from , compute and deterministically and accept withThese ratios are reciprocal at inverse states and enforce detailed balance on the dimension-matched augmented spaces. They specify the proposal density, model-selection probabilities and Jacobian explicitly. The map is a valid example, not a claim of optimal mixing. Positive-temperature beta draws stay in the open interval even when the limiting estimate is an endpoint. At each temperature ensure adequate model switching; retain the best fitted penalized likelihood encountered. If minima tie, limiting concentration need not choose a unique model.
There is a material measurement qualification. A binomial probability mass and an unrounded normal density use different observation reference measures. Their raw AIC values are not an invariant, scientifically calibrated comparison of the same recorded data. The expressions and jump algorithm above implement the formal density comparison suggested by the question, with its units fixed. For integer-recorded measurements, a compatible normal model instead assigns probabilities , suitably adjusting boundaries or truncation if required. Then both models describe the same recorded outcomes relative to counting measure. Use those masses in the normal likelihood and the same reversible-jump formula; its simple normal MLE and conjugate Gibbs updates will generally no longer apply. This observation-model correction cannot be silently combined with the continuous-normal formulas.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 40 5 a Solution Created 2026-10-03 Updated 2026-10-14
For a target probability density function and a proposal distribution with density , the Metropolis–Hastings algorithm starts in the target support and repeats: propose , draw an independent uniform , and move to ifOtherwise retain . A zero reverse-proposal density makes the acceptance zero. Unknown multiplicative constants of cancel. For distinct states,which is symmetric in the states. Together with the probability of holding at the current state, this proves detailed balance and invariance of . Successive values form a dependent Markov chain; convergence from arbitrary initial states additionally needs the appropriate irreducibility and aperiodicity, not just this invariant-density identity.
The Gibbs sampler updates a coordinate using its full conditional distribution while keeping the others fixed. For coordinate , write and . Its proposal replaces by . The MH ratio, interpreted on this one-coordinate proposal space, isThus every Gibbs coordinate update is an MH update with acceptance one. A random choice of coordinate gives a mixture of these invariant kernels; a deterministic sweep gives their composition. Both preserve . The latter composition need not be reversible, so the special-case statement is about the coordinate kernels, not a claim that every entire systematic sweep is one reversible MH kernel.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 40 5 c Solution Created 2026-10-03 Updated 2026-10-20
Use the random-walk proposal specified by its centre and covariance: for the current state draw independently standard normal and setIts properly normalized density of the proposal distribution isIt is symmetric: . This is a centred-at-the-current-state proposal, rather than an unshifted draw from the density notation in the source. The random-walk Metropolis algorithm consequently needs only the target ratio. Put . ThenAn independent uniform decides the move; on rejection both coordinates remain at their previous values. A proposal with lower is always accepted. This construction uses the joint density directly, without needing either conditional distribution. Its continuous positive proposal density supplies communication over the target support, and the holding probability avoids a deterministic periodic transition pattern.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 208 6 a Solution Created 2026-10-03 Updated 2026-10-06
Let be a nonnegative target kernel and a proposal distribution. At state , propose , draw an independent uniform , and move to ifOtherwise keep . This is the Metropolis–Hastings algorithm. Start on the positive target support, with the usual zero-ratio conventions. The unknown normalizing constant cancels.
An unnormalized kernel is sufficient, provided . A genuinely improper target with infinite integral is not a probability density and cannot supply a stationary target probability distribution. The acceptance formula can still be written formally, but cannot be said to generate samples from that nonexistent probability law.
Because rejected proposals leave the state unchanged, the Markov kernel includes an atom:Detailed balance with a probability measure means the measure identityWhere both sides have ordinary densities, this reads . The measure formulation also includes the rejection atom. Integrating it shows that is invariant.
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 2018 iii Paper 216 5 Solution Created 2026-10-03 Updated 2026-10-05
Let be the standard multivariate normal density. Independence gives the proposal distribution densityFor an orthogonal matrix ,The isotropic Gaussian density is unchanged by this transformation. Since has the same distribution as ,Thus this is an orthogonal-mixture Metropolis proposal with a symmetric density; inversion invariance, rather than any assumption of a uniform distribution on orthogonal matrices, is what is needed.
With , the accepted off-diagonal transitions satisfyThe rejection part is supported on the diagonal and satisfies detailed balance automatically. Values of the acceptance rule at starting points where can be specified separately; they do not affect stationarity under . Therefore the Metropolis–Hastings algorithm kernel is reversible with invariant density , proving
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 219 2 v Solution Created 2026-10-03 Updated 2026-10-05
Let be the normalized density in the transformed coordinates of (iv). Its fixed Gaussian increment gives a symmetric proposal distribution: . For distinct states, the accepted transition density is , where . ThenThe rejection probability gives a mass on the diagonal, which trivially satisfies the same balance identity. Thus , the detailed balance condition, and integrating it proves invariance of the target.
The transformed density includes its Jacobian, so mapping back preserves the desired posterior law. Warmup adaptation is excluded from this fixed-kernel proof. Independent augmentation with is itself a reversible conditional update; alternatively the original joint augmented space can be sampled directly. This is the Metropolis–Hastings algorithm balance argument.
Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 219 3 c Solution Created 2026-10-03 Updated 2026-10-20
Use broad proper uniform priors for , , and over physically plausible ranges, and broad log-uniform priors for the positive scales and . ThenA random-walk Metropolis algorithm can update with a multivariate Gaussian proposal distribution. Initialize several dispersed chains near plausible cross-correlation delays and near the marginal-likelihood optimum; reject proposals outside the prior bounds; discard warm-up while adapting only the proposal scale and covariance; then freeze the kernel and retain a long run. Evaluate trace plots, autocorrelations, acceptance rates, between-chain agreement, and the effective sample size of a Markov chain. Posterior predictive quasar light curves provide a model check.
Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 219 3 d Solution 2026-10-03
Write the target posterior density as and the proposal distribution density as . The Metropolis–Hastings algorithm accepts a proposed move withFor distinct states,which is symmetric in and . The rejection probability supplies the diagonal part, so the entire transition kernel satisfies detailed balance. Integrating the detailed-balance identity over the starting state proves . Hence the posterior is a stationary distribution; an irreducible Markov chain that is also an aperiodic Markov chain converges uniquely to it.
To update a positive parameter, a symmetric additive proposal distribution can be generated on the whole real line. Reject nonpositive proposals; accept positive ones using the target density ratio. The off-diagonal proposal remains symmetric. Repeatedly redrawing until the proposal is positive instead truncates and renormalizes the proposal differently at different current states, so a Hastings correction is then required. A symmetric walk in is another valid method, but its transformed target includes the Jacobian determinant factor .
Simulated annealing Created 2026-10-14 Updated 2026-10-18
Simulated annealing accepts worse feasible solutions to escape a local minimum. Minimize an objective function , analogous to energy. Effective temperature has the same units as , absorbing the Boltzmann constant; it controls exploration, rather than a material's thermodynamic temperature.[ref]
Optimization by Simulated Annealing by Scott Kirkpatrick and others. Printed pp. 672–673: effective temperature and cost as energy
Given current feasible point , draw from a proposal distribution . For a symmetric proposal distribution, , use the Metropolis–Hastings acceptance probabilityAccept with this conditional probability; on rejection retain . Every downhill or equal-cost proposal is accepted. Draw a fresh uniform random variable on and accept if . The off-diagonal transition probability includes proposing .[ref]
Optimization by Simulated Annealing by Scott Kirkpatrick and others. Printed p. 672: acceptance rule and rejected proposals
For a maximization problem with objective function , set : every improving proposed neighbor is accepted, and a worsening move of loss has conditional probability of acceptance, under the same symmetry assumption. Likelihood-power annealing uses precisely this sign convention for a log-likelihood. Retain the best feasible solution seen, since the current state can worsen even after a global minimum has been visited.
If the proposal distribution is asymmetric, use the full Metropolis–Hastings acceptance probability, for ,A missing reverse proposal gives zero acceptance. Even a downhill proposal need not be accepted with probability one in this case. Choosing uniformly among a variable number of neighbors is generally asymmetric: and give the correction , where is vertex degree.[ref]
The useful idea is to separate exploring from insisting on improvement: an uphill move can open a route to a better feasible solution. Its usefulness depends on the proposal distribution, the scale of the objective function, and the cooling schedule for simulated annealing. Finite practical schedules carry no general guarantee of finding a global minimum.
