Aimo Törn: Probabilistic Algorithms


Prev   8   Next


Computing Integrals

A Crude Monte Carlo estimate of the integral
            ( 
        I = /  f(x)dx
            )A
is
  I ~ V(A)[f(x1)+... +f(xm)]/m
where V(A) is the size (measure) of the region A and x1,...,xm are uniformly distributed points in A, a subset of Rn. If it is not possible to directly sample uniformly in A but A can be subscribed by a box H, sampling m uniform points in A can be obtained by sampling uniformly in H and accepting those m points that falls in A. By this V(A) can be estimated as
V(A) ~ V(H)·m/M
where M is the number of points sampled in H.

This technique to compute V(A) is called Hit-or-miss Monte Carlo and is very useful for computing measures of complicated regions.