# Monte-Carlo integration with importance-sampling

I came across a paper, where (section 3.2) importance sampling is used to estimate an integral. I think I understand what importance sampling is but I don't understand how they got the solution.

The integral they try to estimate:

(1)

The estimation:

(2)

where q is a proposal distribution they sample from.

For me the traditional definition of importance sampling is:

(3).

In the paper there is y instead of x, so let's continue with that. In section 3.1 They say the integrand from (1) is not normalized, this becomes clear from equation 3 in the paper.

I thought a lot about it, but I do not understand how the solution they provided gets computed from this.

It seems like that from (3), p(y) or f(y) is 1, and the other is the integrand from (1). That is the only way both (2) and (3) are true.

But if p(y) is 1, then it is not a PDF. If f(y) is 1, then p(y) is the integrand from (1), so again not a PDF. (I think it should be a PDF in (3), maybe that's where I'm wrong.)

I would be very grateful if someone could explain how their solution comes from the definition of importance sampling I provided in (3) specifically.

• I think in general, for a uniform [-K/2,K/2] RV, to estimate the integral you need to multiply the $E(f(x))$ by K. When taking K to infinity, this equation hold Commented Oct 8, 2023 at 0:41
Importance sampling means using a substitute density $$q(\cdot)$$ when integrating an arbitrary integrable function $$H(\cdot)$$ $$\int H(y)\,\text dy$$ since $$\int H(y)\,\text dy=\int \frac{H(y)}{q(y)}q(y)\,\text dy=\mathbb E_q\left[\frac{H(Y)}{q(Y)}\right]$$ Therefore, the integrand $$H(\cdot)$$ need not be decomposed as $$p(\cdot)f(\cdot)$$ with $$f$$ a probability density function for importance sampling to apply. (I always point out in class that the decomposition $$H(\cdot)=p(\cdot)f(\cdot)$$ is anything but unique.)