The systematic use of samples of random numbers in order to estimate parameters of an unknown distribution by statistical simulation. Methods based on this principle of random sampling are indicated in cases where the dimensionality and/or complexity of a problem make straightforward numerical solutions impossible or impractical. The method is ideally adapted to computers, its applications are varied and many, its main drawbacks are potentially slow convergence (large variances of the results), and often the difficulty of estimating the statistical error (variance) of the result.
Monte Carlo problems can be formulated as integration of a function over a (multi-dimensional) volume V, with the result
where , the average of f, is obtained by exploring randomly the volume V.
Most easily one conceives a simple (and inefficient) hit-and-miss Monte Carlo: assume, for example, a three-dimensional volume V to be bounded by surfaces difficult to intersect and describe analytically; on the other hand, given a point (x,y,z), it is easy to decide whether it is inside or outside the boundary. In this case, a simply bounded volume which fully includes V can be sampled uniformly (the components x,y,z are generated as random numbers with uniform probability density function), and for each point a weight is computed, which is zero if the point is outside V, one otherwise. After N random numbers, n will have been found inside V, and the ratio n/N is the fraction of the sampled volume which corresponds to V.
Another method, crude Monte Carlo, may be used for integration: assume now the volume V is bounded by two functions z(x,y) and z'(x,y), both not integrable, but known for any x,y, over an interval and . Taking random pairs (x,y), evaluating at each point, averaging to and forming , gives an approximation of the volume (in this example, sampling the area with quasirandom numbers or, better, using standard numerical integration methods will lead to more precise results).
Often, the function to be sampled is, in fact, a probability density function, e.g. a matrix element in phase space. In the frequent case that regions of small values of the probability density function dominate, unacceptably many points will have to be generated by crude Monte Carlo, in other words, the convergence of the result to small statistical errors will be slow. Variance-reducing techniques will then be indicated, like importance sampling or stratified sampling. For more reading, see Press95, Hammersley64, Kalos86.