Quant Memo
Core

Stratified Sampling and Latin Hypercube Designs

Two ways to force a simulation's random draws to spread out more evenly across the possible outcomes, cutting the noise in a Monte Carlo estimate without changing what you're actually simulating.

Prerequisites: Monte Carlo Integration, The Law of Large Numbers

Plain Monte Carlo simulation draws random numbers independently, trusting the law of large numbers to average things out eventually. But "eventually" can be slow: with pure random draws, by bad luck you can easily get ten samples clustered in one corner of the distribution and none in another, and your estimate wobbles more than it needs to for the number of simulations you ran. Stratified sampling and Latin hypercube designs are two ways to deliberately force your random draws to cover the space more evenly, getting a more accurate answer from the same simulation budget — without changing the underlying model or introducing any bias.

An analogy: surveying a country by postcode, not by phone book

Imagine polling opinions across a country by picking phone numbers uniformly at random. Pure chance might oversample one region and undersample another, especially with a modest sample size. A smarter pollster splits the country into regions first, decides how many people to poll from each region in proportion to its population, and then samples randomly within each region. Every region is guaranteed representation, and the poll converges to the true national average faster for the same number of calls, since you've removed the bad-luck scenario of "region got skipped this time" entirely, forcing the sample to look like the population by construction rather than by chance.

The methods, one symbol at a time

Stratified sampling divides the sample space into KK non-overlapping regions called strata, each with known probability pkp_k of containing a draw (in the poll example, each region's population share). Instead of drawing all nn samples independently at random, you draw exactly nk=npkn_k = n \cdot p_k samples from within stratum kk, guaranteeing the right proportion in each region every single run rather than only on average. The overall estimate is the probability-weighted average of the within-stratum sample means, μ^=kpkXˉk\hat\mu = \sum_k p_k \bar{X}_k, and its variance is provably no larger than plain Monte Carlo's variance — strictly smaller whenever the true mean differs across strata, since between-stratum variability (the main source of sampling noise) has been eliminated by design.

Latin hypercube sampling (LHS) generalizes this idea to multiple dimensions at once. For dd input variables and nn samples, each variable's range is divided into nn equal-probability strata, and exactly one sample falls in each stratum for every variable, with the pairing across dimensions randomized. The result is a design where each individual input variable is perfectly stratified (like a Latin square, where every row and column of a grid contains each symbol exactly once), even though the multivariate combinations are still effectively random. This spreads coverage much better than independent stratification of each variable separately, which would require ndn^d points to stratify jointly — LHS gets similar coverage benefits with only nn points regardless of dd.

Worked example: stratifying a single-asset Monte Carlo

Suppose you're estimating the expected payoff of an option using 100 simulated terminal stock prices, where the terminal price is driven by a standard normal draw ZZ. Plain Monte Carlo draws 100 independent standard normal values — by chance, you might get only 3 draws below 2-2 (roughly 2.3% expected) when the tails matter for a deep out-of-the-money payoff. With stratified sampling, split the [0,1][0,1] probability range into 100 equal strata [0,0.01),[0.01,0.02),,[0.99,1)[0, 0.01), [0.01, 0.02), \ldots, [0.99, 1), draw one uniform random number within each stratum, and convert each to a normal draw via the inverse CDF. Now exactly one draw is guaranteed to land in each 1% probability slice, including the extreme tails, every single simulation run — no run can accidentally miss the tail entirely, which is precisely the source of variance that stratification removes.

The explorer below simulates a running average settling on the true value as more draws accumulate; drag between sample sizes and watch how much a single run's estimate can still wobble even at moderate n, which is exactly the wobble stratification is designed to shrink for a fixed number of draws.

Convergence explorer
true meansamples →
after n = 200estimate -0.025error 0.025std error 0.071

Worked example: Latin hypercube on two correlated risk factors

Simulating a portfolio driven by both an equity return and an interest-rate move (2 dimensions) with n=10n = 10 paths: plain Monte Carlo draws 10 independent (equity,rate)(equity, rate) pairs, and might by chance cluster 6 of them in the "equity up, rates flat" corner. LHS instead stratifies each of the two axes into 10 equal-probability bins independently, then randomly pairs an equity-stratum value with a rate-stratum value for each of the 10 samples (a random permutation), so each axis marginal is guaranteed to hit all 10 of its strata exactly once, forcing broad coverage along each dimension while the joint pairing remains randomized and thus unbiased.

plain random Latin hypercube
Plain random draws can cluster by bad luck; Latin hypercube guarantees every row and column stratum is hit exactly once, spreading points evenly across each dimension while keeping the pairing random.

What this means in practice

Both techniques are standard in pricing and risk simulations where the number of paths is limited by compute budget: options pricing (see Monte Carlo option pricing), scenario generation for stress tests, and sensitivity analysis over many risk factors. They reduce variance "for free" — same unbiased answer, fewer paths needed for the same precision — which matters when each path is an expensive full re-pricing. They pair naturally with other variance-reduction tools like antithetic variates and control variates (see variance reduction in Monte Carlo pricing), and LHS in particular is the default choice when simulating many correlated inputs at once, such as a full multi-factor risk scenario.

Stratified sampling and Latin hypercube designs don't change what you're simulating or introduce bias — they force the random draws to cover the input space more evenly than pure chance would, cutting variance for the same number of simulated paths.

The common mistake is assuming stratification always helps and helps a lot. The variance reduction from stratifying a variable is proportional to how much the quantity you're estimating actually varies across that variable's strata — stratifying on a dimension the payoff barely depends on buys almost nothing. Worse, naively computing a standard error from a stratified or Latin hypercube sample using the ordinary independent-sample formula overstates the true uncertainty, because the samples are no longer independent draws from the raw distribution; the correct variance estimator must account for the stratified design, or your confidence intervals will look falsely wide.

Related concepts

Practice in interviews

Further reading

  • Glasserman, Monte Carlo Methods in Financial Engineering, ch. 4
  • McKay, Beckman, Conover, A Comparison of Three Methods for Selecting Values of Input Variables
ShareTwitterLinkedIn