More generaly, imagine a rectangle of height in the
integration interval ,
such that the function is within its boundaries. Compute pairs
of random numbers such that they are uniformly distributed
inside this rectangle. The fraction of points that fall within the area
contained below , i. e., that satisfy
is an
estimate of the ratio o fthe integral of and the area of the
rectangle. Hence, the estimate of the integral will be given by:
Another Monte Carlo procedure is based on the definition: