English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Suppose we want to integrate a function g(x) for a certain space D. Let I be the result of the integration.

Is it true that to get and estimate of I, one can do a Monte Carlo simulation by taking sum of g(Xi)/m where m is the total number of sample points and Xi are randomly sampled points from a uniform distribution in D?

E.g.

Say g(x) = x and we want to integrate from 0 to 100, ie D is 0 to 100.

We take say 6 points, 0, 20, 40, 60, 80, 100, assume they are points gotten from a uniform distribution from 0 to 100. so g(0) = 0, g(20) = 20, etc..

Sum them up is 0 + 20 + 40 +60 +80 + 100 = 300

Estimate = 300/6 = 50.

50 is the exact value of the integral.

The question is does this scheme work for every function g? Assume m can be extremely large, ie approaches infinity.

2006-08-20 16:03:14 · 2 answers · asked by ali 6 in Science & Mathematics Mathematics

2 answers

Actually, as described, your scheme doesn't work at all. Consider that ∫x = x²/2 +C, thus the integral from 0-100 of g(x)= 100²/2-0/2 = 5000, not 50.

What your scheme does do is provide you with an approximation of the average value of the function over that range. If you multiply your apporximation by the range itself, then you would have a valid approximation of the entire integral, and that would indeed work for every possible function. Note that in the case just described, multiplying 50 by 100 gives you the correct value of the integral.

2006-08-20 16:20:40 · answer #1 · answered by Pascal 7 · 1 1

Yes. Check out

http://mathworld.wolfram.com/MonteCarloIntegration.html

2006-08-20 23:11:26 · answer #2 · answered by a_liberal_economist 3 · 0 0

fedest.com, questions and answers