The Metropolis–Hastings Algorithm
Sampling Complex Probability Distributions
Many probabilistic models require sampling from distributions that cannot be evaluated directly.
The Metropolis–Hastings algorithm provides a method for generating such samples through a structured acceptance process.
Core Mechanism
The algorithm proposes a new state based on the current state and then decides whether to accept it.
Acceptance depends on:
the relative probability of the proposed state
a stochastic acceptance rule
This ensures that higher-probability states are sampled more frequently, while still allowing exploration of the full distribution.
Balance Between Exploration and Exploitation
Metropolis–Hastings balances:
exploration of new regions
exploitation of high-probability areas
This balance is critical for accurately approximating complex distributions.
Application at MorMag
Within the Quant Lab, Metropolis–Hastings is used to:
sample posterior distributions in Bayesian models
estimate uncertainty in parameters
support probabilistic scenario generation
It forms part of the computational backbone of probabilistic modelling.
Conclusion
The Metropolis–Hastings algorithm enables practical implementation of complex probabilistic models, supporting structured analysis of uncertainty.

