### Monte Carlo Simulation for Evaluating Definite Intgrals

Kassaye Bewketu Zellelew

#### Abstract

Numerical integration techniques, such as Trapezoidal and Simpson's rules are commonly used for approximating definite integrals where the integrand has continuous derivatives to a certain order and when there is a certain amount of knowledge about the function. If a function fails to satisfy these requirements, then we must often apply a Monte Carlo method to obtain the approximation (Ján Ščigulinský, 2012). Furthermore, Monte Carlo simulation offers an analyst a greater degree of flexibility to dictate his simulation conditions and sampling plans than does an experimenter in a real world environment (E. J. McGrath and D. C. Irving, 1975). The main objective of the study was to test the overall accuracy of Crude Monte Carlo method for evaluating the definite integrals of common functions having different dimensions. To realize this goal, softwares such as MATLAB version 2011, FORTRAN 90/95 and EXCEL 2010 were used. Functions that can be integrated both numerically and analytically were selected so as to compare the results and test the accuracy of the methods. For evaluating the integrals, random numbers were generated between 0 and 1 by typing the ‘rand’ function on the command window of MATLAB version 2011 and also by running the computer program written with FORTRAN 90/95. The integration of too complicated functions was performed numerically using the adaptive Simpson’s Quadrature and results were considered as exact values. To measure the magnitude of the error in the method, the variance of the mesh points were calculated and then compared with the true absolute errors.The results revealed that the overall accuracy of the method is good for one dimensional integration and the accuracy declines as the dimension increases in contrast to some of the literature. Moreover, the accuracy did not necessarily decline as the number of mesh points increased. The variances of the mesh points were found to overestimate the true absolute errors. Theoretical errors were calculated to be greater than the true absolute errors and less than the variances. It can be concluded that one can use Crude Monte Carlo method to estimate the integral of one dimensional complicated functions with known confidence intervals for the true values.

Keywords: Accuracy, Crude Monte Carlo, Relative Error, Simulation, Definite Integrals, random number.

Full Text: PDF 