# Use of this condition on the instrumental density in importance sampling?

From Rubinstein's Simulation Monte Carlo Method, assume r.v. $X$ has density function $f$, $H$ is a measurable function, and $g$ is another density function. If $g$ dominates $Hf$ in the sense that $g(x) =0$ implies $H(x) f(x) =0$, then $$E_{X \sim f} H(X) = \int H(x) f(x) dx = \int \frac{H(x) f(x)}{g(x)} g(x) dx = E_{Y \sim g} \frac{H(Y) f(Y)}{g(Y)}$$

1. I was wondering why $g$ is required to dominate $Hf$? For example, under that condition, $\frac{H(x) f(x)}{g(x)}$ will never be $\frac{a}{0}$ with $a \neq 0$, which is $+\infty$ or $-\infty$, but may be $\frac{0}{0}$, which I think is undefined even for integrand in Lebesgue integral? How does that affect the above equation for importance sampling?

2. Does a different condition "$g$ being non-zero a.s." suffice for importance sampling? Why not $g$ being non-zero a.s. but $g$ dominating $Hf$? Also see the comments after Stefan Hansen's reply.

Thanks and regards!

-

Because then $H(x)f(x)\neq 0$ implies $g(x)\neq 0$, and so we are allowed to multiply and divide by $g(x)$ \begin{align*} \int H(x)f(x)\,\mathrm dx&=\int_{\{H(x)f(x)\neq 0\}} H(x)f(x)\,\mathrm dx=\int_{\{H(x)f(x)\neq 0\}}\frac{H(x)f(x)}{g(x)}g(x)\,\mathrm dx\\ &=\int_{\{g(x)\neq 0\}}\frac{H(x)f(x)}{g(x)}g(x)\,\mathrm dx. \end{align*}
+1 Thanks! (1) But how is the RHS $\int_{\{g(x)\neq 0\}}\frac{H(x)f(x)}{g(x)}g(x)\,\mathrm dx = \int \frac{H(x)f(x)}{g(x)}g(x)\,\mathrm dx$? (2) Does this single condition "$g$ being non-zero a.s." make the equality in my post hold? Why not $g$ being non-zero a.s. in place of $g$ dominating $Hf$? – Tim Dec 9 '12 at 19:40
Note that by $g$ being non-zero a.s., I mean it with respect to the Lebesgue measure. – Tim Dec 9 '12 at 20:29
I'm pretty sure that $\int \frac{H(x)f(x)}{g(x)}g(x)\,\mathrm dx$ means exactly $\int_{\{g(x)\neq 0\}} \frac{H(x)f(x)}{g(x)}g(x)\,\mathrm dx$ because outside $\{g(x)\neq 0\}$ the integrand is not defined (as you've pointed out yourself). – Stefan Hansen Dec 10 '12 at 7:07
And yes, if $g$ is non-zero a.s., then there is no problem when the integrals are understood to be taken over $\{g(x)\neq 0\}$. I think one wants $g$ to dominate $Hf$ because this is more broad than requiring $g$ to be non-zero a.s. – Stefan Hansen Dec 10 '12 at 12:33
Thanks! (1) In the definition of Lebesgue integral, the integrand can take infinity value, as long as the region where it is infinity has measure zero, and in that case, the definition of Lebesgue integral defines the integral over that region to be zero. But if the region has positive measure, the Lebesgue integral may encounter difficulty and take infinite. That is why I think $g$ is nonzero a.s. will be the right condition, instead of $g$ dominates $Hf$. Let me know what do you think? Thanks! – Tim Dec 10 '12 at 16:28