Skip to content
All library documents

Metropolis MCMC for Approximating Bayesian Posterior Distributions

Article QuantStart

Summary

This article introduces Markov Chain Monte Carlo as a numerical way to approximate Bayesian posterior distributions when analytical calculations, including conjugate-prior shortcuts, are unavailable. It explains the Metropolis algorithm as a sequence of proposals in parameter space: propose a move around the current position, accept it probabilistically according to posterior probability, or remain at the current position when rejected. Comparing posterior values removes the shared evidence term, leaving quantities based on the likelihood and prior.

A normal proposal distribution is described, with its width affecting exploration: broad moves travel farther but may miss high-probability regions, while narrow moves can explore slowly. The article demonstrates the ideas through binomial proportion inference using PyMC and places the method alongside more advanced samplers. It is an introductory treatment rather than a full diagnostic guide; its simple sampler is presented as a foundation, and the discussion does not establish trading performance or address all practical convergence concerns.

Key ideas

  • MCMC approximates posterior distributions when direct integration is impractical.
  • The Metropolis method proposes parameter moves and probabilistically accepts or rejects them.
  • Posterior ratios cancel the evidence term, so the acceptance comparison can use likelihoods and priors.
  • Proposal width affects the balance between broad exploration and efficient convergence.
  • PyMC can perform the sampling while allowing the analyst to specify a probabilistic model.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.