Markov chain Monte Carlo (MCMC) in the form of the Gibbs sampler and the Metropolis, Metropolis-Hastings, and Metropolis-Hastings-Green algorithms, permits the simulation of any distribution on a finite-dimensional state space specified by any unnormalized density. As we shall see, when we can simulate we can also do inference.