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 if
Otherwise 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, is
Thus 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.
At , complete the square:
For fixed , all factors not involving enter its conditional normalizing constant. Interchanging the roles of the coordinates gives
These are the full conditional distributions of the standard bivariate normal distribution with correlation .
A systematic Gibbs sampler starts at a chosen and, at each sweep, draws independent standard normals and sets
The second update uses the newly drawn . Both coordinate updates preserve the target by part (a), hence so does the sweep. The Gaussian two-coordinate Gibbs recursion is explicitly
an AR(1) recursion with innovation variance . Its stationary variance is one, and its correlation at sweep lag is , displaying the dependence of the sample.
The printed general- expression has a separate normalization defect: for its integral is , not one, since the exponent has covariance , whose normalizing denominator is . Retaining that exponent requires in the prefactor. The requested target is already normalized, so this defect does not alter the conditional distributions above.
Use the random-walk proposal specified by its centre and covariance: for the current state draw independently standard normal and set
Its properly normalized density of the proposal distribution is
It 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 . Then
An 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.
Tune the proposal scale using pilot runs on a grid of candidate values. After allowing for initial transients, compare the effective sample size of a Markov chain per unit computation time for representative functions, such as both coordinates and a quadratic function. Equivalently inspect their integrated autocorrelation time, using . Choose a useful scale and keep it fixed for the production run. Another pilot criterion is the average squared accepted displacement, possibly in coordinates standardized by the target covariance, which balances move size and rejection.
Acceptance alone is not an efficiency criterion. As , proposals are almost the current state, so acceptance tends to one while exploration becomes arbitrarily slow. Very large scales propose mostly low-density states and produce long sequences of identical values. The proposal scale and random-walk Metropolis efficiency trade-off requires both movement and acceptance; neither maximizing nor merely reporting the acceptance probability guarantees a useful sample. With strong correlation, an isotropic proposal also struggles with the target's narrow direction; covariance-scaled proposals can improve this geometry beyond tuning one scalar variance.

Articles by others on the same topic (0)

There are currently no matching articles.