Latin Hypercube Sampling — Stratified Simulation Design
- Year
- 1979
- Type
- Stratified space-filling sampling design
What does it do?
Latin Hypercube Sampling (LHS) is a stratified space-filling design for computer experiments, introduced by McKay, Beckman, and Conover in 1979.
It divides each input variable's range into equally probable strata and draws exactly one sample per stratum, ensuring that the full input space is covered with far fewer model evaluations than standard Monte Carlo simulation requires. It is routinely paired with global sensitivity analysis — particularly Sobol indices — to quantify how much each input drives output variability.
The intuition behind the method
Imagine you want to understand how a complex computer model responds across a wide range of input combinations, but each model run is expensive. Standard Monte Carlo draws samples randomly and can leave large regions of the input space poorly covered by chance. Latin Hypercube Sampling avoids this by acting like a careful grid: it cuts each input dimension into equally likely slices and guarantees that every slice is represented in the sample exactly once. The result is a set of input points that spreads more evenly across the parameter space than random sampling would, so you learn more about the model's behaviour per run. When combined with Sobol sensitivity indices, the method also tells you which inputs matter most — a critical step before investing in further analysis or calibration.
History
Latin Hypercube Sampling was introduced by McKay, Beckman, and Conover in a 1979 paper in Technometrics, where it was compared against simple random sampling and stratified random sampling as a method for exploring computer model output. The name derives from the Latin square combinatorial structure extended to higher dimensions: just as a Latin square places one symbol in each row and column of a grid, LHS places one sample in each row and column of a multidimensional stratification grid. The method became a cornerstone of computer experiment design — the field formalised by Sacks et al. (1989) — and its pairing with variance-based global sensitivity analysis was systematised by Saltelli and colleagues in the 1990s and 2000s, culminating in the widely used textbook treatment by Saltelli et al. (2008).
When to use it
LHS is appropriate whenever you need to explore how a computationally expensive model responds across its input space and a full factorial or random Monte Carlo design would be prohibitively costly. The method requires that input variable bounds and distributions can be specified — even approximate marginal distributions are sufficient. It is particularly well-suited for global sensitivity analysis when inputs are continuous. If inputs are strongly correlated, apply the Iman-Conover correction before sampling. When the model is very cheap to evaluate, standard Monte Carlo with a very large sample size is a simpler alternative; when you need only local sensitivity, gradient-based methods may be more informative.
Limitations and considerations
- Requires that input distributions and bounds be specified in advance; poorly chosen distributions can misrepresent the true parameter space.
- Sobol sensitivity analysis demands a sample size of N·(k+2), which can become large when the number of inputs k is high.
- LHS does not guarantee optimality in high-dimensional spaces — the advantage over random sampling diminishes as dimensionality grows.
- The method is purely exploratory; it does not itself estimate uncertainty of the output distribution without additional analysis.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Achieves similar estimation accuracy to standard Monte Carlo with substantially fewer model evaluations, making it highly efficient for expensive simulations.
- Guarantees full coverage of each input variable's range through stratification, eliminating the clustering and gaps that plague pure random sampling.
- Pairs naturally with Sobol global sensitivity indices, enabling a principled ranking of input importance.
- Applicable to any black-box model — no derivative information or analytic form is required.
- The Iman-Conover extension handles correlated inputs without sacrificing the space-filling property.
Applications
- Uncertainty and sensitivity analysis in environmental and climate models, where running the model thousands of times at full resolution is infeasible.
- Reliability engineering and structural safety: propagating uncertain material properties and loads through finite-element models to estimate failure probabilities.
- Pharmaceutical and biomedical modelling: exploring how uncertain physiological parameters affect drug concentration predictions in pharmacokinetic models.
- Financial risk analysis: sampling uncertain market parameters to estimate portfolio value-at-risk under a complex pricing model.
- Agent-based social simulations: systematically exploring how uncertain behavioural parameters affect aggregate outcomes.
How it works
How it works
Every uncertain input variable is assigned a probability distribution (uniform, normal, lognormal, etc.) and its plausible range is specified. This step makes explicit what the analyst knows — or assumes — about each parameter before sampling begins. If inputs are correlated, the Iman-Conover rank correlation method can be applied to preserve their dependence structure while still producing a valid LHS design.
Each input variable's cumulative distribution is divided into N equally probable intervals (strata). One value is drawn at random from within each stratum, and the N drawn values are randomly permuted independently across input variables. The result is an N × k matrix (N samples, k inputs) where every row is a distinct combination of input values and every stratum appears exactly once in each column. This stratification property is what makes LHS more efficient than simple random sampling.
The computer model — a simulation, a finite-element solver, an agent-based model, or any black-box function — is evaluated at each of the N sampled input combinations. The output values form a vector Y of length N. The minimum recommended sample size is generally 1000 runs; below this threshold the coverage advantage of LHS over plain Monte Carlo narrows and Sobol indices become unreliable. For Sobol analysis specifically, the required sample size grows as N·(k+2), where k is the number of inputs.
Sobol variance-based sensitivity indices are estimated from the model outputs. The first-order index S_i measures the fraction of total output variance attributable to input i alone; the total-order index S_Ti captures both direct and interaction effects. Together they rank inputs by importance, identify which parameters can be fixed without loss of information, and guide model simplification and further calibration effort.
Common pitfalls
- Using fewer than 1000 sample points: the parameter space is not covered adequately, and Sobol indices computed from small samples have high variance and are unreliable.
- Ignoring input correlations: treating correlated inputs as independent distorts the sample and yields misleading sensitivity estimates — always apply the Iman-Conover correction when correlations are non-negligible.
- Confusing first-order and total-order Sobol indices: a small first-order index does not mean an input is unimportant if it participates in strong interaction effects captured by the total-order index.
- Applying LHS when the model is deterministic and very smooth: in that case, surrogate-model or gradient-based methods may deliver the same insight at lower cost.
Frequently asked questions
How is LHS different from standard Monte Carlo sampling?
Both methods are used to sample an input space for simulation, but they differ in how they place samples. Standard Monte Carlo draws each sample point independently and uniformly at random, which can leave some regions of the input space over-represented and others sparse purely by chance. LHS enforces a stratification rule: each input variable's range is divided into equally probable intervals, and exactly one sample is placed in each interval. This guarantees better coverage of the input space with the same number of points, leading to lower estimation variance for many quantities of interest.
How many samples are needed?
A minimum of 1000 sample points is the commonly recommended threshold for reliable coverage of the input space with LHS. For Sobol sensitivity analysis the required sample size is N·(k+2), where k is the number of input variables. For example, with 10 inputs and N = 1024, the total number of model evaluations is 12 288. Below 1000 samples, the space-filling advantage of LHS narrows and Sobol indices become highly uncertain.
What are Sobol indices and why are they used with LHS?
Sobol indices are variance-based sensitivity measures. The first-order index S_i quantifies how much of the total output variance is explained by input i alone; the total-order index S_Ti captures the combined effect of input i and all its interactions with other inputs. They are commonly paired with LHS because LHS produces a well-spread sample over the input space, which is the starting point for the Saltelli estimator of Sobol indices. Together, the two techniques identify which inputs drive model output and which can be treated as fixed — a key step in model simplification and calibration planning.
What should I do when inputs are correlated?
Standard LHS generates samples under the assumption that inputs are independent. When inputs are correlated, apply the Iman-Conover rank-correlation method as a post-processing step: it rearranges the LHS columns to induce the desired rank correlations among inputs while preserving the marginal distributions and the stratification property. Ignoring known correlations inflates or deflates sensitivity estimates and gives a misleading picture of which inputs matter most.
Related methods
Sources
McKay, M.D., Beckman, R.J. & Conover, W.J. (1979). A Comparison of Three Methods for Selecting Values of Input Variables in the Analysis of Output from a Computer Code. Technometrics, 21(2), 239-245.
Open DOI referenceCopied.Saltelli, A., Ratto, M., Andres, T., Campolongo, F., Cariboni, J., Gatelli, D., Saisana, M. & Tarantola, S. (2008). Global Sensitivity Analysis: The Primer. Wiley.
Open DOI referenceCopied.