prabhas chongstitvatana1 monte carlo integration it is a numerical probabilistic algorithm ab...
TRANSCRIPT
Prabhas Chongstitvatana 1
Monte Carlo integration
It is a numerical probabilistic algorithm
b
a
dxxfI )(
a b
I/(b-a)
f
Prabhas Chongstitvatana 2
I/(b-a)
b-a
MCint(f,n,a,b)
sum = 0
For i = 1 to n do
x = uniform(a,b)
sum = sum + f(x)
Return ( b-a) * (sum/n)
Prabhas Chongstitvatana 3
Variance of the estimate is inverse proportion to n
The expected error is proportion to n/1
A deterministic algorithm for integration will sample at regular interval.
Prabhas Chongstitvatana 4
DETint(f,n,a,b)
sum = 0
delta = (b-a)/n
x = a + delta/2
For I = 1 to n do
sum = sum + f(x)
x = x + delta
Return sum * delta
Prabhas Chongstitvatana 5
Advantage of MCint when doing multiple integral in high dimension. As the sample point increases exponentially with the dimension.
Example 100, 100x100, 100x100x100. MCint is faster than a deterministic algorithm for dimension >= 4.