Monte Carlo Integration

To find the area under a curve, one can use integral calculus. If the curve has no close form, such as the normal curve, then the area can not be derived analytically. However, with today's computer technology, one can use Monte Carlo Integration to achieve such task. The area under a distribution is also known as probability. In this example, we want to compute the area under standard normal probability distribution from 0 to z. We will set z equal to 1.8.

The Monte Carlo Integration procedure is as follow:

The second program utilizes the random numbers generated from a normal distribution to derive the probability. The probability under 1,000,000 iterations using this method is 46.43%. In term of computer time required, this method is 3 to 5 times faster than the Monte Carlo Integration method. However, in order to use the latter method, one must be capable of generating the random numbers which associated to a specific distribution.

The Monte Carlo Integration procedure is as follow:

- Identify the range of X and Y coordinates where the random number will be placed.

- Compute the area of the rectangle in question (defined by red dots in Figure 1) using the X and Y range.

- Run the random process. All the random numbers (X,Y) will land within the rectangle. Count how many points land below the curve.

- Divide the sum of points below the curve by the number of iterations to get the proportion of points below the curve to the total number of points.

- Multiply this proportion by the area to get the probability. This probability is shown on cell D4 of Figure 2. The probability is 46.37%. Compare that result to 46.41%, the result that can be found in the z Table in virtually any statistics textbook.

The second program utilizes the random numbers generated from a normal distribution to derive the probability. The probability under 1,000,000 iterations using this method is 46.43%. In term of computer time required, this method is 3 to 5 times faster than the Monte Carlo Integration method. However, in order to use the latter method, one must be capable of generating the random numbers which associated to a specific distribution.

Copyright © XL Modeling.