Monte Carlo Method
Estimate a hard quantity by generating many random samples and averaging the results.
Monte Carlo Method
The Monte Carlo method turns a hard calculation into a game of chance. When a quantity is too tangled to compute directly — a high-dimensional integral, the value of a board position, the behavior of a messy physical system — you instead sample it at random many times and average. The Law of Large Numbers guarantees the average converges to the true answer, and the Central Limit Theorem tells you how fast. Named after the Monaco casino, it trades exact analysis for honest dice.
The method was born on the Manhattan Project, where physicists needed to track neutrons diffusing through material — a problem with no clean formula but an easy random description. Today it estimates everything from financial risk to the volume of complicated shapes to the moves a game-playing AI should consider.
The core idea
To find some quantity, design a random experiment whose average outcome equals the quantity you want, then run it over and over:
The error shrinks like 1/\sqrt{N} — slow but utterly general. It does not care how many dimensions the problem has, which is exactly why Monte Carlo dominates where grid-based methods drown. To halve the error you must quadruple the samples, the same \sqrt{N} trade-off that haunts the Random Walk.
Estimating π with darts
Here is the cleanest Monte Carlo there is. Throw darts uniformly at a square, and draw the largest circle that fits inside it. The fraction of darts landing inside the circle equals the ratio of areas:
So \pi \approx 4 \times (\text{fraction inside}). Below, darts rain down at random; hits inside the circle are colored, misses are dimmed, and the live estimate of \pi ticks toward 3.14159\ldots as the count climbs. Watch it converge — and watch it converge slowly, jittering by less and less.
Where it shines
Monte Carlo wins whenever the problem is high-dimensional or has no closed form: pricing exotic financial derivatives, simulating particle physics, rendering realistic light in computer graphics, and powering the tree search in modern game engines. It is the computational embodiment of the Law of Large Numbers — and a reminder that a well-aimed random guess, repeated enough, beats a clever formula you cannot find.