Importance sampling is a
Monte Carlo method
Monte Carlo methods, or Monte Carlo experiments, are a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results. The underlying concept is to use randomness to solve problems that might be determi ...
for evaluating properties of a particular
distribution Distribution may refer to:
Mathematics
*Distribution (mathematics), generalized functions used to formulate solutions of partial differential equations
* Probability distribution, the probability of a particular value or value range of a vari ...
, while only having samples generated from a different distribution than the distribution of interest. Its introduction in statistics is generally attributed to a paper by
Teun Kloek
Teunis (Teun) Kloek (born 1934) is a Dutch economist and Emeritus Professor of Econometrics at the Erasmus Universiteit Rotterdam. His research interests centered on econometric methods and their applications, especially nonparametric and robust ...
and
Herman K. van Dijk in 1978, but its precursors can be found in
statistical physics
Statistical physics is a branch of physics that evolved from a foundation of statistical mechanics, which uses methods of probability theory and statistics, and particularly the Mathematics, mathematical tools for dealing with large populations ...
as early as 1949. Importance sampling is also related to
umbrella sampling
Umbrella sampling is a technique in computational physics and chemistry, used to improve sampling of a system (or different systems) where ergodicity is hindered by the form of the system's energy landscape. It was first suggested by Torrie and ...
in
computational physics
Computational physics is the study and implementation of numerical analysis to solve problems in physics for which a quantitative theory already exists. Historically, computational physics was the first application of modern computers in science, ...
. 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
Let
be a
random variable
A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which depends on random events. It is a mapping or a function from possible outcomes (e.g., the po ...
in some
probability space
In probability theory, a probability space or a probability triple (\Omega, \mathcal, P) is a mathematical construct that provides a formal model of a random process or "experiment". For example, one can define a probability space which models t ...
. We wish to estimate the
expected value
In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
of ''X'' under ''P'', denoted E
'X;P'' If we have statistically independent random samples
, generated according to ''P'', then an empirical estimate of E
'X;P''is
:
and the precision of this estimate depends on the variance of ''X'':
:
The basic idea of importance sampling is to sample the states from a different distribution to lower the variance of the estimation of E
'X;P'' or when sampling from ''P'' is difficult.
This is accomplished by first choosing a random variable
such that E
'L'';''P''nbsp;= 1 and that ''P''-
almost everywhere
In measure theory (a branch of mathematical analysis), a property holds almost everywhere if, in a technical sense, the set for which the property holds takes up nearly all possibilities. The notion of "almost everywhere" is a companion notion to ...
.
With the variable ''L'' we define a probability
that satisfies
:
The variable ''X''/''L'' will thus be sampled under ''P''
(''L'') to estimate E
'X;P''as above and this estimation is improved when