= Solution
Let $Y_i$ be iid with density $f$, set $H_i=h(Y_i)$, and put $I=E_fh(Y)$ and $\tau^2=\operatorname{Var}_f(h(Y))$. The finite-second-moment assumption gives, for $\tau^2>0$,
$$
\sqrt N(\widehat I_N-I)\Longrightarrow N(0,\tau^2),\qquad\widehat I_N=N^{-1}\sum_{i=1}^NH_i.
$$
The <sample variance> $s_N^2=(N-1)^{-1}\sum_i(H_i-\widehat I_N)^2$ consistently estimates $\tau^2$. The <central limit theorem> and <Slutsky theorem> therefore give the asymptotic <confidence interval>
$$
\boxed{\left[\widehat I_N-z_{1-\alpha/2}\frac{s_N}{\sqrt N},\quad\widehat I_N+z_{1-\alpha/2}\frac{s_N}{\sqrt N}\right].}
$$
Its confidence probability is approximately $1-\alpha$, conventionally written $100(1-\alpha)\%$; the printed $(1-\alpha)\%$ omits the factor $100$. For $\tau^2=0$, $h(Y)=I$ almost surely and the estimator has zero error. This interval concerns iid <Monte Carlo estimators>; correlated simulation output requires a <long-run variance of a stationary process> estimate instead of the iid <sample variance>.
Back to article page