In Markov chain Monte Carlo (MCMC)
one uses a Markov chain

whose stationary distribution

is the distribution of interest.
Then we run the chain

for a long time

,
then return

.
The chain is designed to be ``ergodic'' so that

is ``
approximately'' sampled from

when

is ``
large enough'' we can sample.
A standard construction of such a chain can be done via
either (a) Metropolis-Hastings algorithm, or (b) Gibbs sampler.
There is a large literature of theory and their applications available for MCMC.
Here we list two useful sites to begin with:
© TTU Mathematics