Prabhas Chongstitvatana1 Monte Carlo integration It is a numerical probabilistic algorithm ab I/(b-a) f
Prabhas Chongstitvatana2 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 Chongstitvatana3 Variance of the estimate is inverse proportion to n The expected error is proportion to A deterministic algorithm for integration will sample at regular interval.
Prabhas Chongstitvatana4 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 Chongstitvatana5 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.