# Volume with MonteCarlo

I'm asked to find the volume of a given bounded solid in $\mathbb{R}^3$ by MonteCarlo means: since it is contained in a prism, I generate random points in the prism and see what proportion of them lie inside my solid. The more points I have, the more precision I'll get.

The problem is I'm asked to give an error estimation as a function of the number of points $n$. I know thereĀ“s an easy expression when evaluating integrals using MonteCarlo methods, but can't find the way to give the analogue here. It may be related, but I'm not sure.

Either a derivation of the seeked expression or a hint to find the analogy will be appreciated. Thanks.

-
Hint: the number of points that fall inside the solid (or, equivalently, the estimated volume) is a random variable. Ask yourself which distribution will it have, its mean and variance... – leonbloy Jan 26 '13 at 21:55
You need to know basic probability theory to show that. – mez Jan 26 '13 at 22:26
The volume can be expressed as an integral, namely, as the integral of the function that is $1$ on your solid and $0$ elsewhere. – Gerry Myerson Jan 27 '13 at 0:48
Thanks Gerry, that's what I finally did. – sheriff Jan 27 '13 at 14:13