I hope this is the right place to ask, if not feel free to move it to a more appropriate forum.
I've been wondering for quite a while now how to treat non-square integrable functions with Monte Carlo Integration. I know that MC still gives a proper estimate but the error is unrealiable (divergent?) for those kind of functions.
Let's restrict us to one dimension. Monte Carlo integration means that we approximate the integral
$$ I = \int_0^1 \mathrm{d}x \, f(x) $$
using the estimate
$$ E = \frac{1}{N} \sum_{i=1}^N f(x_i) $$
with $x_i \in [0,1]$ uniformly distributed random points. The law of large numbers makes sure that $E \approx I$. The sample variance
$$ S^2 = \frac{1}{N-1} \sum_{i=1}^N (f (x_i) - E)^2 $$
approximates the variance $\sigma^2$ of the distribution induced by $f$. However, if $f$ is not square-integrable, i.e. the integral of the squared function diverges, this implies
$$ \sigma^2 = \int_0^1 \mathrm{d} x \, \left( f(x) - I \right)^2 = \int_0^1 \mathrm{d} x \, f^2(x) - I^2 \longrightarrow \infty $$
meaning that also the variance diverges.
A simple example is the function
$$ f(x) = \frac{1}{\sqrt{x}} $$
for which $I = \int_0^1 \mathrm{d}x \, \frac{1}{\sqrt{x}} = 2$ and $\sigma^2 = \int_0^1 \mathrm{d}x \, \left( \frac{1}{x} - 2 \right) = \left[ \ln x - 2x \right]_0^1 \rightarrow \infty$.
If $\sigma^2$ is finite one can approximate the error of the mean $E$ by $\frac{S}{\sqrt{N}} \approx \frac{\sigma}{\sqrt{N}}$, but what if $f(x)$ is not square-integrable?