Follow your curiosity

What discovery has been shared with you?

Start with one fact. Explore it, go deeper, then follow whichever branch catches your imagination.

Choose subjects for a surprise

Exploring any topic

Begin your discovery

Your next discovery is one click away.

Choose one or more subjects above, or leave Any Topic selected and let curiosity decide.

Mathematics

The Monte Carlo Method for Numerical Integration

Quick fact

The Monte Carlo method for integration has an error that decreases as 1/√N (where N is the number of samples), regardless of the number of dimensions—unlike traditional grid methods whose error degrades rapidly with increasing dimension.

Why this is interesting

Suppose you want to find the area under a curve, but the curve is so complicated that a ruler seems useless—what if you could just throw darts at it and count how many land underneath?

Read the full explanation

Understanding The Monte Carlo Method for Numerical Integration

The Monte Carlo method uses randomness to approximate integrals. To estimate the integral of a function f(x) over an interval [a,b], you generate N random points uniformly in that interval, compute the function's value at each point, and average those values. Multiplying this average by the interval's length (b−a) gives an estimate of the integral. The intuition: the average height of the function over many random points approximates the average height over the whole interval, and when you multiply by the width, you get the area. This works because of the law of large numbers—as N grows, the sample average converges to the true mean. The method does not require a smooth function or a simple domain; it just needs the ability to evaluate the function at random points.

A deeper explanation

The underlying principle is statistical estimation. Each random sample f(xi) is a random variable with an expected value equal to the integral divided by the domain size (for uniform sampling). The average of these samples is an unbiased estimator of that expected value. The central limit theorem then shows that the error of this estimate is proportional to σ/√N, where σ is the standard deviation of f over the domain. This means that to reduce the error by a factor of 10, you need to increase N by a factor of 100. In contrast, deterministic quadrature methods like the trapezoidal rule have errors that scale as 1/N^k for some k0, which can be much faster in low dimensions. However, in high-dimensional integrals (say, 10 or more dimensions), the number of grid points needed for deterministic methods explodes exponentially—the so-called 'curse of dimensionality'. Monte Carlo's error is independent of dimension, making it the only viable approach for many high-dimensional problems in physics, finance, and engineering. The method's name comes from the Monte Carlo Casino in Monaco, reflecting its reliance on randomness.

Keep FACTREE close

Internet access is required. Updates arrive when you reopen or reload the app. You may need to sign in again in the installed app.