Markov Chain Monte Carlo (MCMC) Sampling Algorithm

Jump to: navigation, search

An Markov Chain Monte Carlo (MCMC) Sampling Algorithm is a stochastic approximate Bayesian inference algorithm that constructs a Markov chain with the desired probability distribution as its equilibrium distribution.





    • Markov chain Monte Carlo (MCMC) methods (which include random walk Monte Carlo methods) are a class of algorithms for sampling from probability distributions based on constructing a Markov chain that has the desired distribution as its equilibrium distribution. The state of the chain after a large number of steps is then used as a sample of the desired distribution. The quality of the sample improves as a function of the number of steps.

      Usually it is not hard to construct a Markov chain with the desired properties. The more difficult problem is to determine how many steps are needed to converge to the stationary distribution within an acceptable error. A good chain will have rapid mixing — the stationary distribution is reached quickly starting from an arbitrary position — described further under Markov chain mixing time.

      Typical use of MCMC sampling can only approximate the target distribution, as there is always some residual effect of the starting position. More sophisticated MCMC-based algorithms such as coupling from the past can produce exact samples, at the cost of additional computation and an unbounded (though finite in expectation) running time.

      The most common application of these algorithms is numerically calculating multi-dimensional integrals. In these methods, an ensemble of "walkers" moves around randomly. At each point where the walker steps, the integrand value at that point is counted towards the integral. The walker then may make a number of tentative steps around the area, looking for a place with reasonably high contribution to the integral to move into next. Random walk methods are a kind of random simulation or Monte Carlo method. However, whereas the random samples of the integrand used in a conventional Monte Carlo integration are statistically independent, those used in MCMC are correlated. A Markov chain is constructed in such a way as to have the integrand as its equilibrium distribution.






  • (Hilborn, 2004) ⇒ Ray Hilborn. (2004). “The Markov Chain Monte Carlo (MCMC) Algorithm.” Course Lecture Notes: FISH 558, Spring 2004. Advanced Analysis in Fisheries Stock Assessment.
    • Objectives for MCMC
      • MCMC is a way to construct a (joint) Bayesian posterior for the parameters of a population dynamics model.
      • The basic idea is to set up a (long) “chain” which starts at a pre-specified parameter vector and that then traverses the posterior distribution.
      • The sample from the posterior distribution is then every n’th element in the chain (ignoring the first “few” elements of the chain).
    • Overview of the MCMC algorithm
      • Select an “initial” parameter vector (often the mode of the posterior) and compute its posterior density (the product of the likelihood and the prior).
      • Generate a “new” parameter vector based on the current one (using a “jump” function) and compute its posterior density.
      • Replace the current parameter vector by the new parameter vector with probability equal to the ratio of the new to the current posterior density.
      • Output the current parameter vector.
      • Repeat steps 2)- 4) many times!
      • (Steps 2-4 are referred to as a cycle.)




  • (Gelman et al., 1995) ⇒ Andrew Gelman, Hal S. Stern, John B. Carlin, and Donald B. Rubin. (1995). “Bayesian Data Analysis.” Chapman and Hall. ISBN:0412039915


  • (Smith, 1984) ⇒ R. L. Smith. (1984). “Efficient Monte Carlo Procedures for Generating Points Uniformly Distributed Over Bounded Regions.” In: Operations Research, 32.

  1. See Gill 2008.
  2. See Robert & Casella 2004.