Monte Carlo Thinking: Simulation as a First-Class Tool
3 min read
When a probability problem resists closed form, the professional move isn't surrender — it's simulation. Monte Carlo is the law of large numbers turned into a tool, and interviews test both directions: could you simulate this, and do you know what the answer's error bars are?
The method and its error bar
Estimate by averaging independent draws. The estimate is unbiased, and its noise is
— the whole theory in one formula. Consequences you should produce instantly:
- Another digit of precision costs 100× the samples ( smaller SE needs more draws). Monte Carlo converges slowly; its virtue is that the rate doesn't degrade with dimension — which is exactly why derivative pricing on many underlyings simulates while low-dimensional problems use trees or formulas.
- Estimating a probability : SE . For and : SE — a useful anchor. Rare events are the killer: estimating to ±10% relative needs , the motivation for importance sampling.
- Always report the error bar. "About 0.31 ± 0.01" is an answer; "0.3137" from a simulation is a category error — the trailing digits are noise, the same false-precision sin as in Fermi estimation.
The demo everyone should own: π from darts
Throw uniform points in the unit square; the fraction landing inside the quarter-circle estimates . It's the standard "write me a simple simulation" screen: five lines of the Python course's NumPy ((x*x + y*y <= 1).mean() * 4), plus the SE analysis above — with per dart, darts give π to about ±0.0016. Producing both the code and the error bar is the complete answer.
Variance reduction: the craft layer
Same accuracy, fewer samples — the ideas matter more than implementations:
- Antithetic variates: pair each draw with ; errors in symmetric problems partially cancel.
- Control variates: simulate the difference from something you can price exactly (estimate the Asian option as "the closed-form geometric one, plus a simulated correction") — variance drops by the squared correlation with the control. This is also, structurally, how hedged books work: measure P&L relative to the hedge.
- Importance sampling: to estimate tail probabilities, sample from the tail and reweight by the likelihood ratio — the only honest way to Monte Carlo a event, and the bridge to how risk systems stress-test.
Simulation as a check, not just a solver
The most valuable interview use is verification: you've derived 1/4 for the broken-stick problem — a ten-line simulation confirms or destroys it in seconds. Cultivate the habit of saying "and I'd sanity-check that by simulation" with the sketch of how: what you'd draw, what you'd count, how many runs for the precision you need. It signals the working style quant research actually runs on: derive, simulate, reconcile, and trust nothing that hasn't survived both.
The interview version
"How would you estimate the probability that the sum of 10 dice exceeds 45?" — Exact convolution is feasible but tedious; simulate: draw rounds, count exceedances, SE — and cross-check the ballpark with a normal approximation (mean 35, σ ≈ 5.4, so 45 is ~1.85σ: about 3%). Two independent methods, one consistent answer, error bars on both — that's the fluency being examined.