Asked to compute estimator for the following function,
$$\theta = \int_0^\infty \mathrm{e}^{-x^2}~\mathrm{d}x$$
which can be solved by transforming the limits to 0 to 1 and solving the following expectation using Monte Carlo,
$$ E\left[\frac{1}{U^2}~\mathrm{e}^{-(-1+1/U)^2}\right]$$
where $U$ is uniformly distributed
The estimator is, $$\hat\theta = \frac{1}{N} \sum_0^n \frac{1}{U} \space \mathrm{e}^{-(-1+1/U)^2} $$
How do I go about computing the sample variance and then the error? How can I compute the variance without knowing the population mean?
Are there any formulas to choose the best $N$?