Bayesian Statistics TutorialAdvanced
Metropolis Sampling
Learn about Metropolis and Metropolis-Hastings MCMC sampling methods.
Metropolis and Metropolis-Hastings Methods
This tutorial is currently being updated. Check back soon for the complete content.
Overview
Markov Chain Monte Carlo (MCMC) methods are powerful computational techniques for sampling from complex probability distributions. The Metropolis and Metropolis-Hastings algorithms are foundational MCMC methods.
Key Concepts
- Target Distribution: The distribution we want to sample from
- Proposal Distribution: A distribution used to suggest new states
- Markov Chain: A sequence of random variables where each depends only on the previous one
- Acceptance Ratio: Determines whether to accept or reject proposed moves
The Metropolis Algorithm
The Metropolis algorithm uses a symmetric proposal distribution to generate samples from a target distribution.
Algorithm Steps
- Start with an initial state
- For each iteration:
- Propose a new state from the proposal distribution
- Calculate the acceptance ratio
- Accept or reject the proposed state based on this ratio
The Metropolis-Hastings Algorithm
Metropolis-Hastings extends Metropolis by allowing asymmetric proposal distributions, providing greater flexibility for complex sampling problems.
Applications
- Bayesian inference
- Parameter estimation
- Statistical physics
- Machine learning
Further Reading
- Hamiltonian Monte Carlo (HMC)
- Gibbs sampling
- PyMC3, Stan, or JAGS for practical implementations