Metropolis-within-Gibbs algorithm 2026-10-14
A Metropolis-within-Gibbs sweep updates one coordinate or block at a time by a Metropolis–Hastings algorithm transition whose invariant law is that block's full conditional distribution. For a proposal changing only block , the acceptance ratio uses the full joint target with the other coordinates fixed, together with the reverse/forward proposal ratio. Each block kernel preserves the joint posterior, so their composition does as well. Conjugate blocks can instead use exact Gibbs sampling draws. Systematic composition need not be reversible, even when every block kernel is reversible.
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.
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 33 2 i Solution Created 2026-10-03 Updated 2026-10-14
For the Metropolis–Hastings algorithm, start at a point with positive target probability density function. Draw from a proposal probability density function , generate an independent uniform distribution value , and set the next state to ifOtherwise retain , including that repeated state in the sample. Where a proposed forward move is possible but its reverse probability density function vanishes, its acceptance probability is zero. Unknown normalizing constants in cancel.
For distinct states, the accepted probability flow iswhich is symmetric in . This detailed balance identity, together with the holding probability, proves that is invariant. Under appropriate irreducibility and aperiodicity conditions the chain converges to ; successive states are generally dependent.
The Gibbs sampler updates coordinates from their full conditional distributions. In a systematic sweep, draw successivelyEach update preserves the target joint law: integrating the old coordinate against its conditional probability density function and replacing it by an independent draw from that same conditional leaves the joint probability density function unchanged. The composition of the coordinate updates therefore also preserves . A Gibbs sampler coordinate move can be regarded as a Metropolis–Hastings algorithm move with acceptance probability one. Systematic sweeps preserve stationarity but need not themselves be reversible. Initialization away from stationarity requires convergence before treating the draws as approximately target-distributed, and dependence must be accounted for in Monte Carlo method error estimates.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 40 4 a ii Solution Created 2026-10-03 Updated 2026-10-14
At temperature , target a probability density function proportional to on a parameter region where it is normalizable, possibly with a specified proper base measure. A Metropolis–Hastings algorithm proposal has acceptance probabilityFor a symmetric proposal, improving moves are accepted and a loss is accepted with probability . Run updates while gradually lowering toward zero. This simulated annealing scheme initially permits exploration and increasingly favors high objective values. Appropriate cooling and mixing conditions are needed for a general global convergence theorem; a finite arbitrary schedule does not guarantee finding a global maximum.
To maximize a positive likelihood function, take , which has the same maximizers. The resulting likelihood-power annealing target is , and available Gibbs sampler conditional distributions can replace Metropolis proposals.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 43 3 c Solution Created 2026-10-03 Updated 2026-10-14
The marginal Metropolis–Hastings algorithm avoids storing allocation labels, but each component update changes every mixture likelihood term. Cache component contributions, calculate log-likelihoods stably and tune the proposal scale and random-walk Metropolis efficiency during a pilot run; then fix proposal scales or use a justified adaptive scheme. Means and variances may be strongly dependent, making separate random walks inefficient. Weight proposals must respect the simplex, variance proposals must respect positivity, and the displayed acceptance ratios must retain all relevant priors and proposal corrections.
The augmented Gibbs sampler uses elementary conditionals and typically costs order for a label sweep, followed by sufficient-statistic updates. It avoids Metropolis rejections in these conditional draws, but does not remove slow mixing: ambiguous allocations can lock means, variances and labels into strongly coupled configurations. Empty components must be updated from their priors, not deleted automatically. The proper inverse-gamma scale suppresses arbitrarily small variances even though an unregularized Gaussian-mixture likelihood can be singular.
With exchangeable component priors, label switching creates equivalent posterior modes. Ordering component means is an identification constraint, not an innocuous change unless the intended inferential model is made explicit. Predictive density and permutation-invariant summaries avoid arbitrary labelling; component-specific summaries require an appropriate relabelling convention. If the Dirichlet parameters differ between components, exact label symmetry may be broken, but substantial multimodality can remain.
Use dispersed initial states, multiple chains and diagnostics on several scientifically relevant functions. Report effective sample size of a Markov chain and Monte Carlo error estimates, not just a large iteration count. Burn-in can reduce initialization bias but does not prove convergence; thinning cannot by itself cure poor exploration. Closed-form Gibbs updates simplify computation, while reliable inference still requires adequate exploration of the posterior.
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 47 5 a Solution 2026-10-14
The Metropolis–Hastings algorithm is useful when a target posterior can be evaluated up to a normalizing constant but direct independent sampling or simple conditional sampling is unavailable. It constructs a Markov chain with that posterior as invariant law. After adequate convergence, averages of functions of the chain estimate posterior expectations, and the retained draws approximate marginal distributions, quantiles and credible intervals.
For the Random-walk Metropolis algorithm, at current propose , where has a symmetric distribution, often . With a symmetric proposal the acceptance probability isAccept the proposal when an independent uniform is below this probability; otherwise retain the current value. For a nonsymmetric proposal , include in the ratio. Detailed balance follows because the accepted flow is the minimum of the two proposed directional flows; rejection supplies the remaining self-transition probability. Irreducibility, appropriate recurrence and aperiodicity are also needed for convergence.
In the displayed trace plots, the first parameter moves in small increments with pronounced long-term wandering and a shift from its early region to a later region. This is consistent with an undersized proposal or a strongly correlated slow direction. Measure its acceptance rate: if it is very high, increase that coordinate's proposal variance. The second parameter moves rapidly within regions but changes its level around iteration 4500; that is evidence against treating the full run as a settled stationary sample, and it suggests investigating dependence with the first parameter or separated posterior regions. Its local scale may already be reasonable, so a blanket reduction of all proposal variances would be unwarranted. The third parameter has conspicuous long plateaus, indicating many repeated states: if the recorded acceptance is low, reduce its proposal variance; also check constraints and dependence before deciding that scale alone is the cause.
Rerun with coordinate-specific scale changes, inspect joint dependence, consider a covariance-based block proposal, and run longer chains from dispersed starting points. The MCMC trace diagnosis and proposal tuning should include actual acceptance rates and effective sample sizes; the three marginal trace plots do not by themselves identify correlations or prove convergence. Further practical details are in the three subparts.
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 47 5 b Solution Created 2026-10-03 Updated 2026-10-14
For each observation time, use only the currently susceptible risk set , with new-infection indicators . PutThis is the spatial Bernoulli infection model, under conditional independence of the indicators. Distances must be positive. Already infected trees should not be included as new susceptible trials. The minus sign in the power kernel is present in the original PDF, although it is absent in the converted TeX.
The parameter must be nonnegative: for and positive exposure, is not a probability. Therefore the stated unrestricted normal prior distribution cannot literally define the model. A coherent interpretation is a normal prior distribution restricted to ,Here is the standard normal distribution function. Use the same proper prior distribution in both kernel models. The given Gaussian prior distributions for and are mathematically valid on the real line for finite positive distances, though restricting them to positive values would impose decaying kernels and would require the corresponding normalized prior distributions.
The full conditional kernels areNeither is generally normal or another elementary conjugate family: the infection factors contain , and depends nonlinearly on . Thus a simple conjugate Gibbs sampler is unavailable. This does not make Gibbs sampling logically impossible; exact rejection or slice conditional draws could be used if implemented. A straightforward alternative is Metropolis–Hastings algorithm updates within each coordinate.
For example, put and use symmetric Gaussian random-walk proposals for . The target in these coordinates isThe factor is the Jacobian determinant and must be retained. Accept according to the ratio of this target, either for a block or one coordinate at a time. Posterior averages and quantiles of and estimate the requested marginal posterior distributions.
To compare kernels, introduce with positive model prior distribution probabilities . Under model two replace by , defining . The joint model/parameter target iswhere or and is its normalized proper prior distribution. Within each model use the preceding random-walk updates. For a concrete model switch, keep , propose the other model's kernel parameter independently from its prior distribution, and use equal forward and reverse switch-selection probabilities. A move from draws and has ratioAccept with the minimum of this ratio and one. The auxiliary-coordinate swap has absolute Jacobian determinant one, so no additional factor occurs; unequal switch-selection probabilities would require their reverse/forward ratio. This is a valid model-switching Markov chain Monte Carlo construction even though the two active models have equal parameter dimension. Prior distribution proposals may be inefficient, so fitted proposals can be substituted provided their probability densities remain in the acceptance ratio.
After checking mixing, estimate posterior model probabilities by the fractions of retained iterations in each model. The Bayes factor in favor of the first kernel isUse the posterior distributions within each model as well as these odds to assess the competing distance kernels. Proper prior distributions and their model-dependent normalizing constants are essential for this comparison.
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 47 6 Solution Created 2026-10-03 Updated 2026-10-14
For minimizing an energy , simulated annealing at temperature uses the Boltzmann distribution . At each temperature run a Metropolis–Hastings algorithm or Gibbs transition preserving that law, then reduce . With a symmetric proposal, accept with probability : downhill moves are accepted and uphill moves remain possible. Keep the best state encountered. As temperature decreases, equilibrium mass favors global minima, provided the target is proper and the relevant concentration hypotheses hold. An arbitrary finite cooling run does not by itself prove global convergence.
Let , and . For the Poisson distribution model the observations must be nonnegative integers. Its log-likelihood isFor , differentiation gives and . If , the likelihood is decreasing and the maximizer is the boundary value zero. For the normal distribution model write , givingFor each , this is maximized at , and differentiating there gives . HenceThe normal variance estimate has denominator , not . A finite positive normal maximum requires ; if all observations coincide, the likelihood is unbounded as . The normal annealing calculation below assumes .
To maximize likelihood, choose the energy , so the annealing law is , not . This sign is important in the Poisson request: literally inserting a positive log-likelihood into a minimizing Boltzmann law would give a nonnormalizable probability density function growing like at infinity. We use likelihood-power annealing with the maximizing sign.
For the normal distribution model, take base measure . The joint annealing probability density function isCompleting the square gives the Gibbs sampling conditional for . Matching the conditional probability density function to the supplied inverse-gamma distribution convention givesIntegrating out contributes a factor , so the marginal law isThus this joint Boltzmann law is proper for . Its variance marginal and the normal conditional both concentrate at the stated estimates as . For example, for its marginal mean and variance areAlso .
There is a direct convergence proof for the actual changing-temperature Gibbs algorithm, beyond convergence of its equilibrium probability densities. Start at a finite deterministic , choose deterministic with , draw conditional on , then draw conditional on using the two boxed distributions. Conditional normal moments giveThe inverse-gamma distribution first and second moments consequently yieldandIn the first recursion the coefficient of the preceding mean is at most ; in the second the coefficient of the preceding second moment is at most . The means therefore stay bounded, and then so do the second moments. Letting in these formulas gives and . Together with , this provesThis Gaussian likelihood Gibbs annealing convergence uses the explicit conditional structure and does not assume that one Gibbs sampling sweep is an exact equilibrium draw.
For the Poisson distribution model, the likelihood-power law with respect to has the normalized probability density functionsoThe mean tends to and the variance to zero, proving convergence to a point mass at the Poisson maximum-likelihood estimate, including the zero-boundary case.
The Akaike information criterion is , counting one parameter for Poisson and two for normal. With and , the two forms areandChoose the smaller criterion. Likelihood constants that differ between models, including the factorial and terms, cannot be discarded.
For a fully specified trans-dimensional annealing for penalized likelihood, let or and defineUse the combined target, relative to counting measure on models and Lebesgue measure on their parameters,where are fixed reference weights. For and both model components are integrable. The factor is a convenient temperature convention keeping the within-model laws exactly those already derived. The extra factor makes the zero-temperature objective AIC rather than unpenalized likelihood.
Use, for example, probability for a model-change attempt in either model and probability for a within-model update. Within the Poisson distribution model draw a fresh gamma value from its boxed law; within the normal distribution model perform the boxed Gibbs sampling sweep. For a Poisson-to-normal proposal, draw with a fixed , and setThe inverse normal-to-Poisson proposal is with reverse auxiliary . This dimension matching uses one auxiliary variable to augment the one-dimensional Poisson parameter space. The absolute Jacobian determinant isIf the forward model-jump selection probability is and the reverse probability is , the reversible-jump Markov chain Monte Carlo acceptance ratio isAccept with probability . For the reverse move compute and useFor the suggested equal selection probabilities, and those factors cancel. The probability density function must still be included, despite symmetry of its normal distribution: it is an auxiliary draw in only the forward dimension-increasing proposal. Pairing a move with its inverse makes the accepted forward and reverse probability flows equal after the change of variables, proving detailed balance for each fixed-temperature model-switch kernel.
Cool through proper temperatures, allow enough model and parameter exploration at each stage, and retain the smallest observed . The minima of the two energies are exactly the two AIC values above. Low-temperature equilibrium mass concentrates on the better criterion and its fitted parameters; if they tie, the minimizing set contains both models. Unlike the direct normal Gibbs argument, this multimodel exploration claim needs an appropriate cooling/mixing justification and is not guaranteed by an arbitrary short run.
Finally, an exact statistical comparison must put both likelihoods on the same observable and reference-measure convention. A Poisson distribution model is a probability mass function on counts, whereas the displayed normal distribution model is a continuous probability density function. The formulas above are the question's formal Gaussian working-likelihood comparison. A coherent exact normal approximation for count observations can instead use probabilities of rounding intervals; that changes its likelihood and generally loses the simple analytic normal estimates. This distinction matters when interpreting the numerical AIC difference, while leaving the dimension-matching and annealing construction applicable to properly specified likelihoods.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 47 5 a Solution 2026-10-14
For the Metropolis–Hastings algorithm, start at a state with positive target density, propose from , and generate an independent uniform draw. Accept the proposal with probabilityOn rejection retain , including repeated states in the chain; removing repeats would generally change its stationary law. The accepted-flow density satisfieswhich is symmetric in its two states. This proves detailed balance and hence invariance of the target distribution, including the holding probabilities on the diagonal. Unknown common normalization constants cancel in the ratio. Invariance alone does not establish convergence from arbitrary initial states. Choosing proposals that yield a positive Harris recurrent Markov chain with aperiodicity supplies the usual convergence guarantee, and the resulting sample is dependent. Use burn-in and account for autocorrelation when assessing Monte Carlo precision.
Past exam of the mathematics course of the University of Cambridge 2006 ii Paper 3 26J a Solution Created 2026-09-24 Updated 2026-10-14
In Bayesian inference, a finite parameter space has posterior probabilities , with the product of the prior probability and likelihood and the evidence. Although each weight may be easy to evaluate, summing a large parameter space can be impractical. The Metropolis–Hastings algorithm constructs a Markov chain with posterior stationary distribution, allowing posterior expectations, probabilities and credible regions to be estimated from its trajectory. Its acceptance ratios cancel , so direct enumeration of the normalizing constant is unnecessary. Posterior sampling alone does not automatically provide the evidence for comparing models.
Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 48 5 a Solution Created 2026-10-03 Updated 2026-10-14
Both the Metropolis–Hastings algorithm and the Gibbs sampler construct a Markov chain with a specified target distribution, usually a posterior distribution known only up to normalization. For a proposal density and target density , the Metropolis–Hastings acceptance probability isAfter drawing , move there with this probability; otherwise stay at . The unknown normalizing constant of cancels. The original Metropolis algorithm uses a symmetric proposal, , so the proposal-density ratio disappears. The general Metropolis–Hastings algorithm permits nonsymmetric proposals and needs that correction.
A Gibbs sampler instead chooses a coordinate or block and draws directly from its full conditional distribution, leaving the other coordinates fixed. It is exactly a conditional Metropolis–Hastings update whose proposal is that full conditional. For a change from to with fixed, the acceptance ratio isThus a Gibbs update is an always-accepted Metropolis–Hastings update with the full conditional as proposal. This statement concerns each update: a systematic sweep of several Gibbs kernels preserves the target but need not itself be reversible.
When the full conditional distributions are easy to sample, a Gibbs sampler avoids proposal tuning and rejection, and is particularly convenient for conjugate priors and data augmentation. When a conditional cannot be sampled directly, a Metropolis–Hastings algorithm can use only its evaluable density; such an update can also be inserted into a Gibbs sweep. Block or joint Metropolis–Hastings proposals can move efficiently along strongly correlated directions for which coordinate-wise Gibbs updates mix slowly. Conversely, a badly chosen Metropolis–Hastings proposal can reject most moves or make only tiny moves. Acceptance probability one by itself does not guarantee rapid exploration. Both methods require appropriate irreducibility and convergence checks before their long-run averages are useful posterior estimates.
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 2010 iii Paper 33 5 Solution Created 2026-10-03 Updated 2026-10-14
The Metropolis–Hastings algorithm proposes and moves from the current state with acceptance probabilityOn rejection it retains . The target need only be known up to its normalizing constant, but it must define a proper probability distribution. The accepted off-diagonal probability flow iswhich is symmetric in and proves detailed balance. This permits considerable flexibility in proposals, including joint moves when a posterior distribution has strongly correlated parameters, but requires proposal tuning and can waste computation on rejections.
A Gibbs sampler instead updates a coordinate or block from its exact full conditional distribution, holding the other coordinates fixed. This is a special Metropolis–Hastings algorithm update with acceptance probability one: the joint density factors into the unchanged marginal density and the proposed conditional density, which cancel in the acceptance ratio. The coordinate update preserves the target; composing such updates therefore preserves it too, although an entire deterministic sweep need not itself be reversible.
Use Gibbs sampling when the conditional laws are easy to simulate and suitably chosen blocks mix well. Scalar updates can mix poorly under strong posterior distribution correlation, whereas a blocked Gibbs sampler can alleviate that dependence. Prefer a flexible Metropolis proposal when conditional draws are difficult or a well-tuned joint proposal is more effective. Variations include random or systematic coordinate scans, Random-walk Metropolis algorithms, independence proposals, and using Metropolis updates for difficult blocks inside a Gibbs scheme. Both methods generate dependent draws; usable long-run estimates require an appropriate irreducible, aperiodic chain and assessment of mixing, not merely a formal update rule.
For the change-point calculation, put andMultiplication of the Gaussian likelihood function by the specified prior distribution gives the formal posterior distribution kernel, with respect to and counting measure on ,
There is an empty component under an improper prior at . The sum is independent of , whose prior distribution is flat on all of . For every fixed finite and , the kernel is a strictly positive constant in , henceThe configuration has positive prior probability . Integrating over, for example, a bounded interval of and already makes the joint normalization infinite. Thus the printed prior distribution does not produce a posterior probability distribution. This failure is present for every data set, not just for a special arrangement of observations.
The formal full conditionals expose exactly where the requested sampler breaks. For , completing the two mean squares givesThe variance kernel is that of when , and the discrete conditional probabilities are proportional to . At the conditional kernel for is constant and cannot be normalized; it is not a normal distribution with an infinite variance. Therefore no valid Gibbs sampler, and no value of , exists for the model as printed. A chain that simply substitutes an arbitrary distribution for this missing conditional would be sampling a different model.
Here is a fully specified proper-prior repair retaining the no-change configuration. Choose fixed hyperparametersindependently, with . Its Gaussian change-point posterior with proper priors isIt is normalizable even for degenerate data: the likelihood function is at most , and its integral against the variance prior distribution is bounded byThe normal mean priors integrate to one, and the normalizing constant is positive. This proves posterior propriety for the repaired model.
Completing the conditional squares gives the Gaussian change-point Gibbs updates. DefineThe four updates areAt , , giving its proper prior distribution unchanged. Starting from any finite means, positive variance and allowed , cycle through these four updates using the latest values. The sum-of-squares terms can be evaluated from cumulative data sums; normalize the discrete log weights after subtracting their maximum to avoid numerical underflow. The proper positive conditionals allow movement among all split values and throughout the continuous parameter support.
Under this specified repair, is the posterior probability of no change within the observed sequence: all data points belong to the first mean regime. For retained draws after initialization has ceased to affect the estimates, its Markov chain Monte Carlo estimator isAlternatively average the displayed conditional probability of at the sampled continuous parameters, giving an estimate by Rao-Blackwellization. Autocorrelation must be accounted for in its Monte Carlo uncertainty. These are probabilities and estimators for the explicitly repaired model; the original unnormalizable kernel supplies neither.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 29 4 Solution Created 2026-10-03 Updated 2026-10-07
The reversible-jump Markov chain Monte Carlo state comprises the model index and that model's parameter. Its unnormalized posterior density in model isFor models of equal dimension, choose model with probability and propose using density on the destination parameter space. The equal-dimension reversible-jump acceptance probability isOn acceptance change both model and parameter; on rejection retain both. Choose model proposals connecting all models of positive posterior mass and within-model kernels exploring their supports, with aperiodicity, to obtain an ergodic chain. Include within-model updates targeting its conditional posterior, and use model occupation proportions after the initial transient to estimate posterior model probabilities. The formula includes the model prior probabilities, parameter prior densities, likelihoods, reverse model-selection probability, and reverse parameter-proposal density.
This direct-density formula is Metropolis–Hastings algorithm on a disjoint union of equal-dimensional spaces. If instead a move uses a deterministic bijection with auxiliary proposal densities and , useThe Jacobian determinant is one for identity matching, but equal model dimensions alone do not make a nonlinear map volume-preserving. For a direct proposal density the change of variables is already included in that density, so no additional Jacobian factor is inserted.
For the two Poisson models, use the shape-rate convention for the gamma distribution:If denotes scale instead, replace every occurrence of the rate below by . Introduce the inactive under model with the proper pseudo-prior , independent of . This pseudo-prior augmentation for model comparison does not change model 's marginal likelihood because the inactive density integrates to one. The two augmented targets on the same positive quadrant arewhereUse a symmetric cross-model proposal that flips the model label and leaves both parameters unchanged. The matching map is the identity, with unit Jacobian determinant, and the common prior factors cancel. Hence the model-switch acceptance probabilities areOnly the second observation's factor changes because is retained as its shared candidate mean. Evaluate the ratio on a logarithmic scale as for the first direction.
For within-model moves, Poisson-gamma conjugacy gives exact Gibbs sampling refreshes:The two draws are conditionally independent within either model. Choose with fixed positive probabilities between this block refresh and the cross-model proposal. Both moves preserve the augmented posterior; refreshing the inactive parameter maintains its correct distribution and supports mixing. The fraction of retained states labelled estimates .
An equivalent literal dimension-changing implementation deletes on a proposed move, and on a move draws an auxiliary and sets . The birth matching has dimensions and unit Jacobian determinant. Its proposal density cancels the new parameter's prior density, giving the same acceptance ratios above for symmetric selection of move directions. This provides suitable moves without storing an inactive parameter.
For an independent check of Poisson mean equality model comparison, the exact Bayes factor isIt follows by integrating the two gamma likelihood kernels; the common factorial terms cancel. With equal model priors, the exact posterior probability of is , which can also be used to check the RJ-MCMC occupation estimate.
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 37 5 c Solution Created 2026-10-03 Updated 2026-10-06
First require a proper target: and . The Metropolis–Hastings algorithm uses the Metropolis–Hastings acceptance probabilitySufficient general conditions are phi-irreducibility, aperiodicity, and a drift-minorisation condition establishing geometric ergodicity of the resulting chain, together with a stationary th moment for the observable being averaged. These imply the central limit theorem for a geometrically ergodic Markov chain. The observable's moment condition must be included: conditions on the sampler alone cannot give the theorem for every arbitrary function.
A concrete stronger condition, directly in terms of the proposal, isTogether with a bounded observable, this is an especially simple sufficient answer. The accepted proposal density is , so it is at least . The kernel satisfies a global minorization condition with the target, hence uniform geometric ergodicity, positive Harris recurrence, and aperiodicity. An independent proposal whose importance weight is uniformly bounded is one example. No claim of these properties follows merely from writing down a positive proposal.
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.