Monte-Carlo estimation and importance sampling¶

This notebook contains a python adaptation of the importance saimpling example in [1]. The objective is to estimate the following expectation: $$E_{p(\mathcal X)}[f(\mathcal X)],$$ where $p(\mathcal X)$ is the uniform distribution between 0 and 10 and $f$ is defined as follows: $$f(x) = 10 * \exp(-2 | x - 5|).$$ The true value of the expectation is around 10, but we will approximate it using Monte-Carlo estimation and importance sampling.