Monte Carlo Simulation to calculate the area under the curve
Monte Carlo Simulation
The model used to predict the probability of different outcomes when the intervention of random variables is present. The basis of a Monte Carlo simulation involves:
- Assign multiple values to an uncertain variable to achieve multiple results.
- Average the results to obtain an estimate.
Let’s find the area under the sine curve first using calculus and then using Monte Carlo Simulation.
Lets calculate the area under the curve using Calculus,
Now, lets calculate the same area under the curve using Monte Carlo Simulation,
Here is the visual representation of the area way to calculate the area under the curve using Monte Carlo Simulation.
By the above observations, we get the following results,
Total number of points dropped = 1000
Total number of points inside the curve = 624
The area under the curve,
We can conclude that area under the curve using calculus and Monte Carlo simulation gives the same result. In this way, we can calculate the area under the curve using Monte Carlo simulation.