Markov chain Monte Carlo integration, or MCMC, is a term used to cover a broad range of
methods for numerically computing probabilities, or for optimization. They are simulation
methods, mostly used in complex stochastic systems where exact computation and even
simple simulation are not computationally feasible.
Methods that fall under this heading include Metropolis sampling, Hastings sam-
pling and Gibbs sampling which are for integration and simulated annealing and
sometimes genetic algorithms which are optimization techniques.
Although these methods are mainly used for complex systems we have already seen a
problem which can be very easily addressed using MCMC- that is finding the exact p-value
for a test of association between the rows and columns of a contingency table.