Next: Integration by Sampling the
Up: monte
Previous: monte
To simplify the discussion, consider integrating over a single
variable. Suppose we want to integrate a function
over a
finite interval
.
 |
(1) |
We can think of the problem as one of determining the area under a
curve, as illustrated in Fig. 1. (If the function takes on negative
values and it is bounded by
below, we integrate
and
then subtract
from the result.)
One way to determine the area is simply to throw darts at the
rectangle that bounds the area. If the darts are uniformly
distributed across the bounding rectangle, the area is just the total
area times the fraction of darts hitting the target. Suppose the
function is bounded by
above and 0 below. Then if a fraction
of the darts hits the area in question, the integral is just
 |
(2) |
where
is the area of the sampling region.
What is the error in this result? The process can be thought of a
sampling problem with the objective of determining the probability
of hitting the target. The sampling process produces a series of
random values
equal to zero if the target is missed and one if
the target is hit. Thus with
random samples we are estimating the
mean value
 |
(3) |
For a large sample, the error in this estimate is approximately
 |
(4) |
where
 |
(5) |
(Here
because
is only zero or one.)
Thus we have
 |
(6) |
and the error decreases as the square root of the sample size.
Next: Integration by Sampling the
Up: monte
Previous: monte
Carleton DeTar
2002-04-03