wikipedia "Cross-entropy method"

Estimation via important sampling

"Consider the problem of estimating the quantity

$$ l = \mathbb{E}_\mathbf{u}[H(\mathbf{X})] = \int H(\mathbf{x})\,f(\mathbf{x}; \mathbf{u})\,d\mathbf{x} $$

... where $H$ is some performacne function and $f(\mathbf{x}; \mathbf{u})$ is a member of some parametric family of distributions. Using importance sampling this quantity can be estimated as

$$ \hat{l} = \frac{1}{N} \sum_{i=1}^N H(\mathbf{x}_i) \frac{f(\mathbf{X}_i; \mathbf{u})} {g(\mathbf{X}_i)} $$

where $\mathbf{X}_1,\dots,\mathbf{X}_N$ is a random sample from $g$. For positive $H$, the theoretically optimal importance sampling density (pdf) is given by:

$$ g^*(\mathbf{x}) = \frac{H(\mathbf{x})\, f(\mathbf{x}; \mathbf{u})} {l} $$