diff --git a/docs/source/sampler/metropolis_hastings.rst b/docs/source/sampler/metropolis_hastings.rst index 6b2c868a41b7904003f11ae3637829873b464e18..cedb0b529569f0f5ac249ebac1ba5b45d1808491 100644 --- a/docs/source/sampler/metropolis_hastings.rst +++ b/docs/source/sampler/metropolis_hastings.rst @@ -1,6 +1,27 @@ Metropolis Hastings Sampling ============================ +Metropolis Hastings sampling is a widely used Markov Chain Monte Carlo (MCMC) +algorithm for generating a sequence of samples from a target probability +distribution where direct sampling is difficult. The samples can be used to +estimate properties of the target distribution, like its mean, variance, and higher +moments. The samples can also be used to approximate the target distribution, +for example via a histogram. The algorithm works by constructing a Markov chain +with a stationary distribution equal to the target distribution. + +Steps of the algorithm are as follows: + + 1. Choose an initial state for the Markov chain, usually from the target distribution. + 2. At each iteration, propose a new state by sampling from a proposal distribution. + 3. Calculate the acceptance probability. + 4. Accept or reject the proposed state based on the acceptance probability. + 5. Repeat steps 2-4 for a large number of iterations to obtain a sequence of samples. + 6. Apply "burn-in" and "thining". + +Final samples from the Markov chain can then be used to estimate the target +distribution or its properties. + + MetropolisHastings Class ------------------------