Solution (source code)

= Solution

For $V=q/r$ under the <posterior density> $\pi=r/Z$,
$$
\mathbb E_\pi V^2=\frac1Z\int_{\{r>0\}}\frac{q(\theta)^2}{r(\theta)}\,d\theta.
$$
The independent-draw <variance of a sample mean> therefore yields
$$
\boxed{\operatorname{Var}(\widehat p_2^{-1})=\frac1T\left[\frac1Z\int\frac{q^2}{r}-\frac1{Z^2}\right]=\frac1{TZ^2}\left[\int\frac{q^2}{\pi}-1\right]}.
$$
Since
$$
\int\frac{q^2}{\pi}-1=\int_{\{\pi>0\}}\frac{(q-\pi)^2}{\pi}\,d\theta\geq0,
$$
we again obtain
$$
\boxed{q_{\rm opt}=\pi,\qquad \min\operatorname{Var}(\widehat p_2^{-1})=0}.
$$
The optimum is again generally unavailable as an evaluable normalized density without knowing $Z$.

\b[A proposal with too much mass where the posterior density is tiny makes reciprocal weights unstable.] In particular, proposal tails that are too heavy relative to the <posterior distribution> can make $\int q^2/\pi$ infinite. This contrasts with ordinary <importance sampling>, whose dangerous denominator is $q$. Choosing a normalized $q$ restricted to a well-covered posterior region is allowed, although a very small region can make most draws contribute zero and increase <variance>. Taking $q=p(\theta)$ gives the <Harmonic mean estimator of Bayesian model evidence>, illustrating why very small <likelihood> values can cause severe instability.