Importance sampling approach to estimation of expected value

178 Views Asked by At

I want to use importance sampling approach to estimate the expectation of the function $f(x) = xe^{-x}$ where x is distributed exponentially with mean $\lambda^{-1}$ and variance $\lambda^{-2}$ using the integration:

$I = \int_0^{\infty} xe^{-x}dx$

The examples I have seen use definite integral, but this one is closed only on the lower bound.

1

There are 1 best solutions below

1
On BEST ANSWER

To compute an integral $\int_I f(x) dx$ using importance sampling against a pdf $g(x)$, you rewrite the integral by multiplying and dividing by $g(x)$ (where $g(x)>0$ on $I$ and $\int_I g(x) dx = 1$), getting $\int_I \frac{f(x)}{g(x)} g(x) dx$. This is then the expected value of $f(X)/g(X)$ when $X$ has the pdf $g$. In your situation, that means that you write $\int_0^\infty \frac{x e^{-x}}{\lambda e^{-\lambda x}} \lambda e^{-\lambda x} dx = \int_0^\infty \frac{x e^{(\lambda-1)x}}{\lambda} \lambda e^{-\lambda x} dx$. Thus it is $\frac{E \left [ X e^{(\lambda-1)X} \right ]}{\lambda}$. You can then compute that expected value by drawing values from the exponential distribution and then average values of $Xe^{(\lambda-1)X}$ as you draw. The exponential distribution often has built-in programs in software (e.g. exprnd in Matlab), but if not then you can use the probability integral transformation, which in this case results in $-\lambda^{-1} \ln(U)$ where $U$ is uniformly distributed on $(0,1)$.