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)} $$
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?
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*} $$