Importance Sampling — Variance Reduction for Rare Events

Simulation
Introduced by
Herman Kahn & Theodore Harris (RAND Corporation, 1951)
Year
1951
Type
Monte Carlo variance-reduction technique

What does it do?

Importance sampling is a Monte Carlo variance-reduction technique that draws samples from a proposal distribution concentrated on the region of interest, typically a rare or extreme event, and then corrects each sample with a likelihood-ratio weight so that the estimate remains unbiased for the original distribution.

It is generally credited to Herman Kahn and Theodore Harris at the RAND Corporation around 1951. It makes tail-probability estimates, such as Value-at-Risk or system-failure probabilities, feasible where standard Monte Carlo would need a very large number of runs.

The intuition behind the method

Consider estimating the chance that the total of ten dice reaches an extreme high value. If the dice are rolled fairly, such totals almost never occur, so most simulated rolls contribute nothing. Importance sampling instead uses a biased rule that makes high faces much more likely, counts how often the extreme total occurs, and multiplies each counted outcome by the likelihood ratio: how much less likely that outcome is under the fair rule than under the biased rule. This ratio is the weight. Averaging the weighted outcomes gives an unbiased estimate of the original rare-event probability, usually with far fewer wasted rolls than fair sampling would need.

History

Importance sampling is generally credited to Herman Kahn and Theodore Harris at the RAND Corporation, who are associated with the weighted Monte Carlo idea around 1951. Its use in statistics and simulation grew over the following decades. Glasserman's 2003 monograph is a standard reference for its application in financial engineering, including the estimation of tail risk. Later proposal-optimisation approaches, such as the cross-entropy method, were developed after the original work.

When to use it

Importance sampling suits problems where the probability or expectation involves a rare event, typically with probabilities well below 0.01 or otherwise sampled too seldom by crude Monte Carlo to be estimated with acceptable precision. Typical cases include tail-loss measures such as Value-at-Risk and Expected Shortfall in finance, system-failure probabilities in reliability engineering, and particle transport in physics. It requires that the likelihood ratio p(x)/q(x) can be evaluated pointwise and that the weights have finite variance under q. Do not use it when a proposal cannot be designed that covers the rare region, or when the event is common enough for crude Monte Carlo to give adequate precision, because a poorly matched proposal can make the variance larger than the crude estimator's.

Limitations and considerations

  • A good proposal requires problem-specific insight into where the rare region lies; a poor choice can increase rather than decrease variance.
  • The weights must have finite variance under q. Proposals with lighter tails than the target, or other mismatches, can produce a few extremely large weights that dominate the estimate.
  • Performance tends to deteriorate in high-dimensional problems, because the proposal becomes harder to design and the weights become more variable.
  • Reliable use requires monitoring auxiliary diagnostics such as the ESS and the weight variability, which adds work beyond a naive simulation.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Can reduce the variance of rare-event probability estimates substantially compared with crude Monte Carlo, because samples are concentrated where the event occurs.
  • The estimator stays unbiased for the original target as long as the likelihood ratio is computable and the support condition holds, so the correction does not depend on the proposal being optimal.
  • The proposal can be refined iteratively, for example with the cross-entropy approach, as information about the rare region accumulates.
  • Applies to continuous and discrete distributions alike, provided the likelihood ratio is well defined.

Applications

  • Estimating Value-at-Risk (VaR) and Expected Shortfall for financial portfolios, where large losses are rare under normal conditions.
  • Computing failure probabilities in reliability and safety engineering when failures are very infrequent.
  • Particle transport and radiation simulation in physics.
  • Rare-event analysis in network reliability and queueing systems.
  • Posterior computation in Bayesian problems where observations are sparse or extreme, using sequential variants.

How it works

How it works

1

Specify the quantity to estimate, typically a probability P(X ∈ A) or an expectation E[f(X)] under the original distribution p. The event A is the rare region that standard Monte Carlo samples too seldom to be useful.

2

Design a proposal distribution q that puts substantial probability mass on the region A. The theoretically optimal proposal is proportional to |f(x)| p(x), but this is usually not available in closed form, so it is approximated, for example by exponential tilting (shifting the distribution toward the tail) or by iteratively fitting q to the optimal form, as in the cross-entropy method.

Formula
q^*(x) \propto |f(x)| \, p(x)
3

Draw N independent samples x₁, …, x_N from the proposal q rather than from p. Because q concentrates near the rare region, a larger share of these samples are informative.

4

Compute the likelihood-ratio weight wᵢ = p(xᵢ) / q(xᵢ) for each sample. This ratio corrects for the fact that the samples came from q rather than p, and it is what restores unbiasedness.

Formula
w_i = p(x_i) / q(x_i)
5

The importance-sampling estimator is the weighted average μ̂ = (1/N) Σ f(xᵢ) wᵢ. It is unbiased for E_p[f(X)] provided the support condition holds (q(x) > 0 wherever p(x) f(x) ≠ 0), and its variance can be far below that of crude Monte Carlo when q is well matched to the target.

Formula
\hat{\mu} = \frac{1}{N}\sum_{i=1}^{N} f(x_i)\,w_i
6

Check the effective sample size ESS = (Σwᵢ)² / Σwᵢ² and the spread of the weights. An ESS close to N indicates that the weights are fairly even and q is a reasonable match. A small ESS means that a few large weights dominate the estimate, so the reported precision is overstated and the proposal should be revised before the result is relied on.

Formula
\mathrm{ESS} = \left(\sum w_i\right)^2 / \sum w_i^2

Common pitfalls

  • If the proposal assigns zero probability to part of the region where p(x) f(x) is nonzero, the estimate is biased. Verify that q(x) > 0 wherever p(x) f(x) > 0 before running the simulation.
  • A small ESS relative to N means the apparent precision is misleading: a handful of extreme weights carries the estimate and the confidence interval understates the uncertainty.
  • In high dimensions, plain importance sampling with a single fixed proposal often suffers severe weight degeneracy. Sequential schemes or splitting the event into a chain of less rare events are usually needed.
  • The self-normalised estimator (weights divided by their sum) is slightly biased in finite samples but often has lower variance. Be clear about which form is being reported when interpreting results.

Frequently asked questions

How is importance sampling different from standard Monte Carlo?

Standard (crude) Monte Carlo draws samples from the original distribution p and counts how often the rare event occurs. When the event is very unlikely, few samples hit the region and the variance is large. Importance sampling draws from a proposal distribution q that covers the rare region more densely, then corrects each sample with the likelihood ratio p(x)/q(x) so that the estimate remains unbiased for the same quantity. When q is well chosen, the variance is much smaller.

How do I choose the proposal distribution?

The theoretically optimal proposal is proportional to |f(x)| p(x), but this is rarely available in closed form. Practical strategies include exponential tilting (shifting a distribution toward the tail), iterative schemes such as the cross-entropy method, or constructions based on domain knowledge. Whatever is chosen, compute the ESS and the weight spread to check that the proposal is adequate.

What is the effective sample size (ESS) and why does it matter?

ESS = (Σwᵢ)² / Σwᵢ² summarises how many equal-weight independent samples the weighted sample is worth. An ESS close to N indicates a well-matched proposal. An ESS much smaller than N means that a few large weights dominate, which can make the estimate look more precise than it is. A low ESS is a signal to revise the proposal rather than to trust the reported uncertainty.

Can importance sampling be used in high dimensions?

With difficulty. In high dimensions the likelihood-ratio weights tend to become highly variable, which reduces the ESS sharply. Common remedies are sequential importance sampling (as in particle filters), conditioning on a lower-dimensional statistic, or splitting the rare event into a sequence of less rare events. A single fixed proposal is most reliable when the dimension is modest and the proposal is carefully designed.

Related methods

Sources

  1. Rubinstein, R.Y. & Kroese, D.P. (2016). Simulation and the Monte Carlo Method (3rd ed.). Wiley.

    Open DOI reference
  2. Glasserman, P. (2003). Monte Carlo Methods in Financial Engineering. Springer.

    Open DOI reference