Mean Value Theorem for Integrals and Monte Carlo Integration

The mean value theorem for integrals states that if is continuous over , then there exists a real number with such that . Writing this as shows that the area under the curve is the base times the "average height" . To estimate this integral by the Monte Carlo method, use the following steps:

(1) Pick uniformly distributed numbers in the interval [,].

(2) Evaluate the function at each point and calculate the average function value: .

(3) Compute the approximate value of the integral: .