Adapted from an appendix of my MS thesis.
Markov Chain Monte Carlo
Almost as soon as computers were invented, they were used for simulation. Markov chain Monte Carlo (MCMC) was invested as Los Alamos, Metropolis et al (1953) simulated a liquid in equilibrium with its gas phase. Their tour de force was the realization that they did not need to simulate the exact dynamics, they only needed to simulate some Markov chain with the same equilibrium distribution. The Metropolis algorithm was widely used by chemists and physicists, but was not widely known among statisticians until after 1990. Hastings (1970) generalized the Metropolis algorithm, and simulations following his scheme are said to use the Metropolis-Hastings (MH) algorithm [1].
A special case of the MH algorithm was introduced by Geman et al (1984) discussing optimization to find the posterior mode rather than simulation. Algorithms following their scheme are said to use the Gibbs sampler. It took some time for the spatial statistics community to understand that the Gibbs sampler simulated the posterior distribution, thus enabling full Bayesian inference of all kinds. Gelfand et al (1990) made the wider Bayesian community aware of the Gibbs sampler, and then it was rapidly realized that most Bayesian inference could be done using MCMC, whereas very little could be done without MCMC. Green (1995) generalized the MH algorithm as much as it could be generalized [1].
Theoretical Foundations
A sequence of random elements of some set is a Markov chain if the conditional distribution of given depends on only. The set in which the take values is called the state space of the Markov chain. A Markov chain has stationary transition probabilities if the conditional distribution of given does not depend on . This is the main kind of Markov chain of interest in MCMC. The joint distribution of a Markov chain is determined by the following [1].
The marginal distribution of called the initial distribution, and
The conditional distribution of given called the transition probability distribution.
If the state space is finite or countable, written , then the initial distribution can be associated with a vector defined by for , and the transition probabilities can be associated with a matrix having elements defined by where and . When the state space is uncountable, we must think of the initial distribution and transition probability distribution as unconditional and conditional probability distributions [1].
A stochastic process is stationary if for every positive integer the distribution of the -tuple does not depend on . An initial distribution is said to be stationary, invariant, or equilibrium for some transition probability distribution if the Markov chain specified by this initial distribution and transition probability distribution is stationary. Stationarity implies stationary transition probabilities, but not vice versa. The Metropolis-Hastings-Green (MHG) algorithm constructs a transition probability distribution that preserves a specified equilibrium distribution [1].
A transition probability distribution is reversible with respect to an initial distribution if for its Markov chain , the distribution of pairs is exchangeable. Reversibility implies stationarity, but not vice versa. A reversible Markov chain has the same laws running forward and backward. That is, for any and , the distributions and are the same. All known methods for constructing transition probabilities that preserve a specified equilibrium are special cases of the MHG algorithm, and all elementary updates from the MHG algorithm are reversible [1].
A bit of compute code that makes a pseudorandom change to its state is an update mechanism. An update mechanism is elementary if it is not made up of parts that are themselves update mechanisms preserving the specified distribution. Suppose the specified distribution (the desired stationary distribution of the MCMC sampler) has unnormalied density . The Metropolis-Hastings update does the following [1]:
When the current state is , propose a move to , having conditional probability density given denoted .
-
Calculate the Hastings ratio
-
Accept the proposed move with probability
that is, the state after the update is with probability , and the state after the update is with probability .
For example, consider the probability density function is given by where we cannot or do not desire to solve the integral in the denominator analytically. Therefore, the distribution is only known up to some unknown constant: . Notice that the ratio from does not depend on the normalizing constant. The latter term corrects for biases from the proposal distribution. The special case of the Metropolis-Hastings algorithm where the proposal distribution is symmetric meaning is referred to as the Metropolis algorithm [1].
The Metropolis-Hastings update is reversible with respect to , meaning that the transition probability that describes the update is an exact sampler of the specified distribution. If is the current state and is the proposal, we have whenever the proposal is rejected. The distribution of given rejection is exchangeable, and we must show that is exchangeable given acceptance. That is, we must show that for any function that has expectation, we can interchange the arguments of [1].
This follows if we can interchange and in . Only the set of and such that , , and contribute to the integral or sum in the discrete case. These inequalities further imply that and . Thus for all and . Suppose that , so and . Then we have the following [1].
Conversely, suppose that , so and , and we have the following [1].
References
- Brooks, Steve, Gelman, Andrew, Jones, Galin, Meng, Xiao-Li (Eds.) (2011) Handbook of Markov Chain Monte Carlo. Chapman and Hall/CRC.
Top comments (0)