# Importance sampling

﻿
Importance sampling

In statistics, importance sampling is a general technique for estimating the properties of a particular distribution, while only having samples generated from a different distribution rather than the distribution of interest. Depending on the application, the term may refer to the process of sampling from this alternative distribution, the process of inference, or both.

Basic theory

More formally, let $X$ be a random variable in $S$. Let $p$ be a
probability measure on $S$, and $f$ some function on $S$. Then the expectation of $f$ under $p$ can be written as

: $mathbf\left\{E\right\} \left[f\left(X\right)|p\right] equiv int f\left(x\right) p\left(x\right) ,dx.$

If we have random samples $x_1, ldots, x_n$, generated according to$p$, then an empirical estimate of $p$ is

:$P_n\left(x\right) = frac\left\{1\right\}\left\{n\right\}sum_\left\{i=1\right\}^n delta_\left\{x_i\right\}\left(x\right).$

where $delta_\left\{x_i\right\}\left(x\right) = 1$ for $x_i=x$ and 0 otherwise.

In that case, we can easily obtain the Monte-Carlo empirical estimate of $mathbf\left\{E\right\} \left[f\left(X\right)|p\right]$

: $hat\left\{mathbf\left\{E_n \left[f\right] = int f\left(x\right) d P_n\left(x\right) = frac\left\{1\right\}\left\{n\right\} sum_\left\{i=1\right\}^n f\left(x_i\right).$

The basic idea of importance sampling is to draw from a distribution other than $p$, say $q$ and modify the above formula to still get a consistent estimate of $mathbf\left\{E\right\} \left[f\left(X\right)\right]$. A main reason for such a procedure is the potential to reduce the variance of $hat\left\{mathbf\left\{E \left[f\left(X\right)\right]$ by an appropriate choice of $q$, hence the name importance sampling, as samples from $q$ can be more "important" for the estimation of the integral. Other reasons include difficulties to draw samples from distribution $p$ or efficiency considerations.

More formally, consideranother probability measure, $q$, with the same support as$p$. From the definition of the expectation given above, we have

: $mathbf\left\{E\right\} \left[f\left(X\right)|p\right] = frac\left\{int f\left(x\right) w\left(x\right) q\left(x\right) ,dx\right\}\left\{int w\left(x\right) q\left(x\right)dx\right\},$

where $w\left(x\right) = frac\left\{p\left(x\right)\right\}\left\{q\left(x\right)\right\}$, is known asthe "importance weight" and the distribution $q$ is frequently referred to as the "sampling" or "proposal" distribution. Then, if we have random samples $x_1, ldots, x_n$, generatedaccording to $q$, a Monte Carlo estimate of $mathbf\left\{E\right\} \left[f\left(X\right)|p\right]$ follows fromthe above equation by viewing the problem as that ofestimating the expectations $mathbf\left\{E\right\} \left[f\left(X\right)w\left(X\right)|q\right]$ and $mathbf\left\{E\right\} \left[w\left(X\right)|q\right]$.

: $hat\left\{mathbf\left\{E_\left\{n,q\right\} \left[f\right] = frac\left\{1/n sum_\left\{i=1\right\}^n f\left(x_i\right) w\left(x_i\right)\right\}\left\{1/n sum_\left\{j=1\right\}^n w\left(x_j\right)\right\} = sum_\left\{i=1\right\}^n f\left(x_i\right) v_i,$

where $v_i=frac\left\{w\left(x_i\right)\right\}\left\{sum_\left\{j=1\right\}^n w\left(x_j\right)\right\}$ are the "normalised importance weights".

The technique is completely general and the above analysis can be repeated essentially exactly also for other choices of $p$, for example when it represents a conditional distribution. Note that when $p$ is the uniform distribution, we are just estimating the (scaled) integral of $f$ over $S$, so the method can also be used for estimating simple integrals.

There are two main applications of importance sampling methods which, naturally, are interrelated. While the aim of both applications is to estimate statistics of random variables, the field of probabilistic inference focuses more on the estimation of $p$ or related statistics, while the field of simulation focuses more on the choice of the distribution $q$. Nevertheless, the basic theory and tools are identical.

Application to probabilistic inference

Such methods are frequently used to estimate posterior densities or expectations in state and/or parameter estimation problems in probabilistic models that are too hard to treat analytically, for example in Bayesian networks.

Application to simulation

Importance sampling (IS) is a variance reduction technique that can be used in the Monte Carlo method. The idea behind IS is that certain values of the input random variables in a simulation have more impact on the parameter being estimated than others. If these "important" values are emphasized by sampling more frequently, then the estimator variance can be reduced. Hence, the basic methodology in IS is to choose a distribution which "encourages" the important values. This use of "biased" distributions will result in a biased estimator if it is applied directly in the simulation. However, the simulation outputs are weighted to correct for the use of the biased distribution, and this ensures that the new IS estimator is unbiased. The weight is given by the likelihood ratio, that is, the Radon-Nikodym derivative of the true underlying distribution with respect to the biased simulation distribution.

The fundamental issue in implementing IS simulation is the choice of the biased distribution which encourages the important regions of the input variables. Choosing or designing a good biased distribution is the "art" of IS. The rewards for a good distribution can be huge run-time savings; the penalty for a bad distribution can be longer run times than for a general Monte Carlo simulation without importance sampling.

Mathematical approach

Consider estimating by simulation the probability $p_t,$ of an event $\left\{ X ge t \right\}$, where $X$ is a random variable with distribution $F$ and probability density function $f\left(x\right)= F\text{'}\left(x\right),$, where prime denotes derivative. A $K$-length independent and identically distributed (i.i.d.) sequence $X_i,$ is generated from the distribution $F$, and the number $k_t$ of random variables that lie above the threshold $t$ are counted. The random variable $k_t$ is characterized by the Binomial distribution

:$P\left(k_t = k\right)=\left\{Kchoose k\right\}p_t^k\left(1-p_t\right)^\left\{K-k\right\},,quad quad k=0,1,dots,K.$

Importance sampling is concerned with the determination and use of an alternate density function $f_*,$(for X), usually referred to as a biasing density, for the simulation experiment. This density allows the event $\left\{ X ge t \right\}$ to occur more frequently, so the sequence lengths $K$ gets smaller for a given estimator variance. Alternatively, for a given $K$, use of the biasing density results in a variance smaller than that of the conventional Monte Carlo estimate. From the definition of $p_t,$, we can introduce $f_*,$ as below.

:

where

:$W\left(cdot\right) equiv frac\left\{f\left(cdot\right)\right\}\left\{f_*\left(cdot\right)\right\}$

is a likelihood ratio and is referred to as the weighting function. The last equality in the above equation motivates the estimator

:$hat p_t = frac\left\{1\right\}\left\{K\right\},sum_\left\{i=1\right\}^K 1\left(X_i ge t\right) W\left(X_i\right),,quad quad X_i sim f_*$

This is the IS estimator of $p_t,$ and is unbiased. That is, the estimation procedure is to generate i.i.d. samples from $f_*,$ and for each sample which exceeds $t,$, the estimate is incremented by the weight $W,$ evaluated at the sample value. The results are averaged over $K,$ trials. The variance of the IS estimator is easily shown to be

:

Now, the IS problem then focuses on finding a biasing density $f_*,$ such that the variance of the IS estimator is less than the variance of the general Monte Carlo estimate. For some biasing density function, which minimizes the variance, and under certain conditions reduces it to zero, it is called an optimal biasing density function.

Conventional biasing methods

Although there are many kinds of biasing methods, the following two methods are most widely used in the applications of IS.

Scaling

Shifting probability mass into the event region $\left\{ X ge t \right\}$ by positive scaling of the random variable $X,$ with a number greater than unity has the effect of increasing the variance (mean also) of the density function. This results in a heavier tail of the density, leading to an increase in the event probability. Scaling is probably one of the earliest biasing methods known and has been extensively used in practice. It is simple to implement and usually provides conservative simulation gains as compared to other methods.

In IS by scaling, the simulation density is chosen as the density function of the scaled random variable $aX,$, where usually $a>1$ for tail probability estimation. By transformation,

:

and the weighting function is

:$W\left(x\right)= a frac\left\{f\left(x\right)\right\}\left\{f\left(x/a\right)\right\} ,$

While scaling shifts probability mass into the desired event region, it also pushes mass into the complementary region

Translation

Another simple and effective biasing technique employs translation of the density function (and hence random variable) to place much of its probability mass in the rare event region. Translation does not suffer from a dimensionality effect and has been successfully used in several applications relating to simulation of digital communication systems. It often provides better simulation gains than scaling. In biasing by translation, the simulation density is given by

:$f_*\left(x\right)= f\left(x-c\right), quad c>0 ,$

where $c,$ is the amount of shift and is to be chosen to minimize the variance of the IS estimator.

Effects of system complexity

The fundamental problem with IS is that designing good biased distributions becomes more complicated as the system complexity increases. Complex systems are the systems with long memory since complex processing of a few inputs is much easier to handle. This dimensionality or memory can cause problems in three ways:

* long memory (severe intersymbol interference (ISI))
* unknown memory (Viterbi decoders)
* possibly infinite memory (adaptive equalizers)

In principle, the IS ideas remain the same in these situations, but the design becomes much harder. A successful approach to combat this problem is essentially breaking down a simulation into several smaller, more sharply defined subproblems. Then IS strategies are used to target each of the simpler subproblems. Examples of techniques to break the simulation down are conditioning and error-event simulation (EES) and regenerative simulation.

Evaluation of IS

In order to identify successful IS techniques, it is useful to be able to quantify the run-time savings due to the use of the IS approach. The performance measure commonly used is $sigma^2_\left\{MC\right\} / sigma^2_\left\{IS\right\} ,$, and this can be interpreted as the speed-up factor by which the IS estimator achieves the same precision as the MC estimator. This has to be computed empirically since the estimator variances are not likely to be analytically possible when their mean is intractable. Other useful concepts in quantifying an IS estimator are the variance bounds and the notion of asymptotic efficiency.

Variance cost function

Variance is not the only possible cost function for a simulation, and other cost functions, such as the mean absolute deviation, are used in various statistical applications. Nevertheless, the variance is the primary cost function addressed in the literature, probably due to the use of variances in confidence intervals and in the performance measure $sigma^2_\left\{MC\right\} / sigma^2_\left\{IS\right\} ,$.

An associated issue is the fact that the ratio $sigma^2_\left\{MC\right\} / sigma^2_\left\{IS\right\} ,$ overestimates the run-time savings due to IS since it does not include the extra computing time required to compute the weight function. Hence, some people evaluate the net run-time improvement by various means. Perhaps a more serious overhead to IS is the time taken to devise and program the technique and analytically derive the desired weight function.

References

* R. Srinivasan, "Importance sampling - Applications in communications and detection", Springer-Verlag, Berlin, 2002.
* B. D. Ripley, "Stochastic Simulation", 1987, Wiley & Sons
* "Sequential Monte Carlo Methods in Practice", by A Doucet, N de Freitas and N Gordon. Springer, 2001. ISBN 978-0387951461
* "Introduction to rare event simulation", James Antonio Bucklew, Springer-Verlag, New York, 2004.
* P. J.Smith, M.Shafi, and H. Gao, "Quick simulation: A review of importance sampling techniques in communication systems," IEEE J.Select.Areas Commun., vol. 15, pp. 597-613, May 1997.
* M. Ferrari, S. Bellini, "Importance Sampling simulation of turbo product codes," ICC2001, The IEEE International Conference on Communications, vol. 9, pp. 2773-2777, June 2001.
* Tommy Oberg, Modulation, Detection, and Coding, John Wiley & Sons, Inc., New York, 2001.
* Arouna. Adaptative Monte Carlo Method, A Variance Reduction Technique. Monte Carlo Methods and Their Applications. 2004

* Monte Carlo method
* Stratified sampling
* Recursive stratified sampling
* Particle filter &mdash; a sequential Monte Carlo method, which uses importance sampling
* Auxiliary field Monte Carlo

* [http://www.creem.st-and.ac.uk/ken/Classes/S540/Handouts/rvgen6.pdf Monte Carlo Methods and Importance Sampling] , Eric C. Anderson, Lecture notes for Stat 587C
* [http://www-sigproc.eng.cam.ac.uk/smc/ Sequential Monte Carlo Methods (Particle Filtering)] homepage on University of Cambridge
* [http://www.iop.org/EJ/abstract/0143-0807/22/4/315 Introduction to importance sampling in rare-event simulations] European journal of Physics. PDF document.
* [http://portal.acm.org/citation.cfm?id=1030470 Adaptive monte carlo methods for rare event simulation: adaptive monte carlo methods for rare event simulations] Winter Simulation Conference

Wikimedia Foundation. 2010.

### Look at other dictionaries:

• Importance Sampling — ist ein Begriff aus dem Bereich der stochastischen Prozesse, der die Technik zur Erzeugung von Stichproben anhand einer Wahrscheinlichkeitsverteilung beschreibt. Importance Sampling wird benutzt, um die Effizienz von Monte Carlo Simulationen zu… …   Deutsch Wikipedia

• Importance Sampling — Échantillonnage préférentiel L échantillonnage préférentiel, en anglais importance sampling, est une méthode de réduction de la variance qui peut être utilisée dans la méthode de Monte Carlo. L idée sous jacente à l échantillonnage préférentiel,… …   Wikipédia en Français

• Importance sampling — Échantillonnage préférentiel L échantillonnage préférentiel, en anglais importance sampling, est une méthode de réduction de la variance qui peut être utilisée dans la méthode de Monte Carlo. L idée sous jacente à l échantillonnage préférentiel,… …   Wikipédia en Français

• Sampling (statistics) — Sampling is that part of statistical practice concerned with the selection of individual observations intended to yield some knowledge about a population of concern, especially for the purposes of statistical inference. Each observation measures… …   Wikipedia

• Sampling (music) — This article is about reusing existing sound recordings in creating new works. For other uses, see Sample (disambiguation). In music, sampling is the act of taking a portion, or sample, of one sound recording and reusing it as an instrument or a… …   Wikipedia

• sampling — A method for collecting information and drawing inferences about a larger population or universe, from the analysis of only part thereof, the sample. Censuses of the population are an expensive way of monitoring social and economic change, and… …   Dictionary of sociology

• sampling weights — Weights are used in sampling to achieve proportionality. Sampling weights are the inverse of sampling fractions. When different sampling fractions have been applied to particular sub groups within the population studied, sampling weights are used …   Dictionary of sociology

• Nested sampling algorithm — The nested sampling algorithm is a computational approach to the problem of comparing models in Bayesian statistics, developed in 2004 by physicist John Skilling. Contents 1 Background 2 Applications 3 …   Wikipedia

• Metropolis-Sampling — Der Metropolisalgorithmus ist eine Monte Carlo Methode zur Erzeugung von Zuständen eines Systems entsprechend der Boltzmann Verteilung. Inhaltsverzeichnis 1 Algorithmus 1.1 Verallgemeinerung 2 Anwendungen 2.1 Monte Carlo Simulation …   Deutsch Wikipedia

• Echantillonnage d'importance — Échantillonnage préférentiel L échantillonnage préférentiel, en anglais importance sampling, est une méthode de réduction de la variance qui peut être utilisée dans la méthode de Monte Carlo. L idée sous jacente à l échantillonnage préférentiel,… …   Wikipédia en Français