Presentation is loading. Please wait.

Presentation is loading. Please wait.

MAT 4830 Mathematical Modeling 04 Monte Carlo Integrations

Similar presentations


Presentation on theme: "MAT 4830 Mathematical Modeling 04 Monte Carlo Integrations"— Presentation transcript:

1 MAT 4830 Mathematical Modeling 04 Monte Carlo Integrations http://myhome.spu.edu/lauw

2 Preview Look at how to use random numbers to evaluate some integrals First application of Monte Carlo Methods Keep in mind that there are “better” numerical methods to evaluate integrals No programs will be provided for the example below

3 Example 0 Suppose we want to estimate the value of the integral

4 Example 0 Since the function is non-negative over the interval [0,1], the value of the integral is the same as the area under the graph

5 Example 0 We are going to estimate the area by random numbers.

6 Example 0

7 In general, the no. of trials needs to be large.

8 Example 0

9 Maple Commands Activate random number generator for various probability distributions. Can be used before the program (as shown) or within the program.

10 Maple Commands Generate random numbers for uniform distributions.

11 Example 0 What are the disadvantages?

12 Example 0 What are the disadvantages? 1. 2. 3. 4.

13 Monte Carlo Methods Statistical simulation methods Method that utilizes sequences of random numbers to perform the simulations

14 Classwork Individual* (Each of you need to think through the process) Absolutely no communications. Fact: some of you will be faster than some of the other which is normal!

15 Classwork Write a program to estimate the value of the integral

16 Hint: Input n

17 Hint: Input n Repeat the following n times. 1. Generate a random point (x,y) inside the box. 2. Decide if the point is under the graph. Keep track of the number of success.

18 Hint: Input n Repeat the following n times. 1. Generate a random point (x,y) inside the box. 2. Decide if the point is under the graph. Keep track of the number of success. Compute the estimated area. Output the estimated area.

19 HW Problem 1 Write a program to estimate the value of the integral

20 HW Problem 2 Write a program to estimate the value of the integral

21 HW Problem 3 Design an experiment using Monte Carlo Integration to estimate the value of


Download ppt "MAT 4830 Mathematical Modeling 04 Monte Carlo Integrations"

Similar presentations


Ads by Google