What Is a Monte Carlo Simulation? Answering Questions by Guessing a Lot
By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.
Some problems are too complicated to solve with equations and easy to describe as a process. Monte Carlo methods exploit that by running the process thousands or millions of times with random inputs and looking at the distribution of results, which converts an impossible calculation into a tractable counting exercise.
The idea in its simplest form
The classic demonstration estimates pi. Draw a square with a quarter circle inscribed in it, scatter points at random across the square, and count how many fall inside the arc. Because the ratio of the areas is pi over four, the proportion of points landing inside estimates pi, and the estimate improves as more points are thrown. Nothing about that requires knowing any geometry beyond the relationship between the shapes. The general pattern is the same: express the quantity you want as an expected value or a proportion, generate random samples, and average. The accuracy improves with the square root of the number of samples, which is the method's central weakness and strength. Getting one more decimal place requires a hundred times as many samples, which is slow, and the rate does not depend on how many dimensions the problem has, which is why the method wins decisively on high-dimensional problems where conventional numerical integration becomes impossible.
Where it came from
The method was developed at Los Alamos in the 1940s, and the origin story is well documented. Stanislaw Ulam, recovering from illness and playing solitaire, wondered what the probability of a particular layout succeeding was, found the combinatorial calculation impractical, and realised that simply dealing many hands and counting successes would answer it. He discussed the idea with John von Neumann, and it was applied to neutron diffusion problems in weapons work, where the physics of a neutron's path through material is easy to describe probabilistically and impossible to integrate directly. Nicholas Metropolis suggested the name after a relative who gambled at the Monte Carlo casino. The approach required a source of random numbers at a scale no physical process could supply, which drove the development of pseudorandom number generators, algorithms producing sequences that pass statistical tests for randomness while being entirely deterministic and reproducible from a seed.
What it is used for
The method spread far beyond physics because so many problems have the right shape:
- •Financial risk, valuing options and estimating portfolio losses by simulating many possible market paths, which is standard practice and was implicated in failures when the assumed distributions understated extreme events
- •Project planning, estimating completion dates by sampling task durations from distributions rather than adding best guesses, which reveals how badly simple addition underestimates delay
- •Nuclear and particle physics, tracking particles through matter, which remains a core application
- •Weather and climate ensembles, running models many times with perturbed starting conditions
- •Bayesian statistics, where Markov chain Monte Carlo methods sample from distributions that cannot be written down explicitly, which transformed the field from the 1990s and made previously impossible models routine
- •Engineering tolerance analysis, drug trial design, epidemiological modelling, computer graphics rendering and game-playing algorithms, where Monte Carlo tree search underlies modern game programs
How it goes wrong
The method is only as good as the assumptions fed into it, and the risk is that a large number of simulations produces false confidence. Choosing the wrong input distributions produces precise answers to the wrong question, and the recurring failure is assuming a normal distribution where the real one has fat tails, so extreme events appear far less likely than they are. Ignoring correlation between inputs is the second common error, since variables that move together in reality but independently in a model make outcomes look far safer than they are, which was a documented feature of risk models before 2008. Poor random number generators produce hidden structure, which has invalidated published results. Insufficient samples give a noisy answer whose uncertainty must itself be reported. And because the output is a distribution, it can be summarised misleadingly, with an average concealing a tail that is the entire reason the analysis was done. Variance reduction techniques and careful sensitivity analysis address the technical parts, and none of them fixes the wrong distribution.
The takeaway
Monte Carlo methods answer hard questions by simulating a process many times with random inputs and examining the distribution of results, which turns an intractable calculation into counting. Accuracy improves only with the square root of the sample count, which is slow, and does not worsen with dimension, which is why it dominates high-dimensional problems. It was developed at Los Alamos in the 1940s from Ulam's question about a card game. Its failures come from wrong input distributions and ignored correlation rather than from the method.