Numerical Integration: Monte Carlo integration
Efficiency of Monte Carlo integration (programming assignment)
Use your previously implemented function for Monte Carlo integration.
- Find out how large the sample must be to approximate the integral with a precision of , , and .
- Compare the result from part (a) with the following probability-based algorithm to approximate an integral : draw a uniform sample of values in the interval , calculate the mean value of the function for the drawn values in the sample and multiply this mean value by the length of the interval, i.e. by .
Unlock full access