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 if
Otherwise 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 is
which 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 successively
Each 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.
Assume and , as required for the displayed nonsingular probability density function. Put . Its quadratic exponent is
Holding fixed and normalizing the term depending on gives
The analogous completion of the square gives
Using independent draws from the standard normal distribution, a sweep is
Use the newly drawn first coordinate in the second update. Recording the pairs after each sweep gives the dependent sample.
The Gaussian Gibbs sweep autocorrelation makes the dependence explicit. In standardized coordinates, substitution yields
The new noise has variance , so the stationary variance is one and the lag- sweep autocorrelation is . Thus the sampler converges geometrically for , but becomes slow near perfect correlation. When , complete sweeps yield independent pairs. The singular cases do not have the stipulated two-dimensional probability density function.
Here the proposal is with . Its probability density function depends only on , so . The determinant and normalizing constant of the target also cancel. With as in the preceding entry,
Equivalently, writing and ,
One can also compute the exponent without subtracting two large quadratic forms:
Generate two independent standard normal distribution proposal increments, compute this log ratio, and accept when . Retain the previous pair on rejection. Detailed balance gives the correct invariant distribution, and the everywhere-positive Gaussian proposal makes this random-walk Metropolis algorithm chain irreducible; a rejection probability provides a holding step. The resulting target-distributed pairs are dependent, with proposal scale and target anisotropy controlling how quickly they mix.

Articles by others on the same topic (0)

There are currently no matching articles.