The chapter begins with the general principle of Monte Carlo methods (MC) - using random numbers for calculating an integral. The independent MC is based on independent random numbers and the law of large numbers. The Markov Chain Monte Carlo methods (MCMC) are based on Markov chains and ergodic theorem. The trial and error algorithm is explained with the historical hard shell gas model. Additionally, Different versions of the Metropolis algorithm are presented: random walk Metropolis, hit and run, Metropolized independent sampler, Langevin Metropolis-Hastings, and Multiple-try Metropolis-Hastings. The adaptive MCMC, perfect simulation, and different Gibbs samplers are also presented. The chapter ends with a description of approximative Bayesian computation methods (ABC) and ABC-MCMC.
The underlying theoretical background of the various methods are explained, and efficient implementation is discussed. All methods are demonstrated with a series of examples and plots. Some of the most important R codes are given. The chapter ends with a list of problems useful for written exams.