In statistics, importance sampling is a general technique for estimating properties of a particular distribution, while only having samples generated from a different distribution than the distribution of interest. It is related to umbrella sampling in computational physics. Depending on the application, the term may refer to the process of sampling from this alternative distribution, the process of inference, or both. In statistics, importance sampling is a general technique for estimating properties of a particular distribution, while only having samples generated from a different distribution than the distribution of interest. It is related to umbrella sampling in computational physics. Depending on the application, the term may refer to the process of sampling from this alternative distribution, the process of inference, or both. Let X : Ω → R {displaystyle X:Omega o mathbb {R} } be a random variable in some probability space ( Ω , F , P ) {displaystyle (Omega ,{mathcal {F}},P)} . We wish to estimate the expected value of X under P, denoted E. If we have statistically independent random samples x 1 , … , x n {displaystyle x_{1},ldots ,x_{n}} , generated according to P, then an empirical estimate of E 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, or when sampling from P is difficult.This is accomplished by first choosing a random variable L ≥ 0 {displaystyle Lgeq 0} such that E = 1 and that P-almost everywhere L ( ω ) ≠ 0 {displaystyle L(omega ) eq 0} .With the variate L we define a probability P ( L ) {displaystyle P^{(L)}} that satisfies The variable X/L will thus be sampled under P(L) to estimate E as above and this estimation is improved when var [ X L ; P ( L ) ] < var [ X ; P ] {displaystyle operatorname {var} left