File Name: Analytics – Mathematical Integration Approximation Model
Location: Modeling Toolkit | Analytics | Mathematical Integration Approximation Model
Brief Description: Applies simulation to estimate the area under a curve without the use of any calculus-based mathematical integration
Requirements: Modeling Toolkit, Risk Simulator
There are several ways to compute the area under a curve. The best approach is the mathematical integration of a function or equation. For instance, if you have the equation:
then the area under the curve between 1 and 10 is found through the integral:
Similarly, any function f(x) can be solved and found this way. However, for complex functions, applying mathematical integration might be somewhat cumbersome. This is where simulation comes in. To illustrate, how would you solve a seemingly simple problem like the following?
Well, dust off those old, advanced calculus books and get the solution:
The point is sometimes simple-looking functions get really complicated. Using Monte Carlo simulation, we can approximate the value under the curve. Note that this approach yields only approximations, not exact values. Let’s see how this approach works…
The area under a curve can be seen as the shaded area (A.T.R.U.B) in Figure 4.1, between the x-axis values of A and B, and the y = f(x) curve.
Figure 4.1: Graphical representation of a mathematical integration
Looking closely at the graph, one can actually imagine two boxes. Specifically, if the area of interest is the shaded region or A.T.R.U.B, then we can draw two imaginary boxes, A.T.U.B and T.Q.R.U. Computing the area of the first box is simple, where we have a simple rectangle. Computing the second box is trickier, as part of the area in the box is below the curve and part of it is above the curve. In order to obtain the area under the curve that is within the T.Q.R.U box, we run a simulation with a uniform distribution between the values A and B, and compute the corresponding values on the y-axis using the f(x) function, while at the same time, simulate a uniform distribution between f(A) and f(B) on the y-axis. Then we find the average number of times the simulated values on the y-axis are at or below the curve or f(x) value. Using this average value, we multiply it by the area in the box to approximate the value under the curve in the box. Summing this value with the smaller box of A.T.U.B provides the entire area under the curve.
The analysis in the Model worksheet illustrates an approximation of a simple equation; namely, we have the following equation to value:
Solving this integration, we obtain the value under the curve of:
Now, we attempt to solve this using simulation through the model shown in Figure 4.2.
Figure 4.2: Simulation model for mathematical integration
The result is 2494.11, a close approximation to 2499.75, with an error of about 0.23%. Again, this is a fairly decent result but still an approximation. This approach relieves the analyst from having to apply advanced calculus to solve difficult integration problems.