Monte Carlo Simulations Explained: Pi, Card Games, and Retirement
Monte Carlo methods apply randomness and the law of large numbers to solve problems that resist analytical treatment. The technique traces back to Ulam and von Neumann’s post-war nuclear weapon work, and its core tradeoff is convergence speed: for independent trials, sampling error shrinks as 1/√N, meaning cutting the error in half demands four times the samples. Estimating pi by simulating dart throws onto a quarter-circle inscribed in a unit square illustrates this—thousands of samples give a rough figure, while roughly ten billion are needed for four reliable decimal places. The same class of problem, numerical integration, is where Monte Carlo shines in high dimensions where deterministic quadrature becomes prohibitively expensive.
A combinatorial example uses the card game SET, where the probability that a random 12-card hand from the 81-card deck contains no valid set has no simple closed-form count. Enumerating all 70 trillion hands is intractable, but a simulation of ten million random draws reproduces the exact probability (3.23%, confirmed by Knuth’s exhaustive search yielding 2,284,535,476,080 set-free hands) with minimal effort. Scaling the question to 15-card hands multiplies the combinatorial space roughly a hundredfold, yet the Monte Carlo approach only requires adjusting one parameter.
The most practically consequential example is retirement portfolio projection. A naive model assuming constant 4% returns and 2% inflation suggests a $1M portfolio drawing $30K annually lasts about 55 years. Monte Carlo simulation, however, draws returns and inflation from realistic distributions and reveals the fragility of the average: sequence-of-returns risk, inflation-return correlation, and variance mean that in 25% of a million simulated paths the money runs out by roughly year 22, and only about 60% of paths sustain the plan for 30 years. As additional factors—asset mix, life expectancy, tax changes—are layered in, the single-number estimate becomes increasingly misleading, which is precisely the problem Monte Carlo methods are built to address.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.