Monte Carlo methods

Generally speaking, Monte Carlo methods are algorithms that simply incorporate random sampling to make approximations. Three most common use cases include Mathematical optimization, Numerical integration, and drawing samples from Probability distributions.

The general pattern followed by most Monte Carlo methods is as follow:

  1. Define domain of possible inputs
  2. Generate random values from a Probability distribution over that domain
  3. Perform some analysis on the resulting samples

A common example used to introduce Monte Carlo methods and the power of random sampling for approximation is the estimation of π\pi using uniform random samples inside of a square.