[ Home ] | Numerical Methods. Note « 13 » |
NB: There have been suggested two subjects for the last lecture:
Random sampling. Plain Monte Carlo. We sample N points randomly from the integration region and evaluate the average of the integrand. The integral is equal to the volume of the integration region times the average of the integrand
∫ab f(x) dx ≈ (b-a)<f> = (b-a) 1/N ∑ i f(xi) . |
Importance sampling. Metropolis algorithm. Distribute points not uniformly but with larger density in the regions which contribute most (that is where the function is largest). Suppose that the points are distributed with the density ρ, that is the number of points Δn in the interval Δx is equal Δn = ρ(x)Δx. Then the estimate of the integral I is
I = ∑ fi Δxi = ∑ fi 1/ρi = ∑ fi/ρi |
Stratified sampling. Distribute more points in the regions where the variance is largest. The MISER routine implements recursive stratified sampling along the following lines
sample few points randomly from the given volume calculate average and variance if variance is small enough then estimate the grand average and grand variance; done else estimate which dimension gives the largest variance subdivide your volume in two along this dimension recurse for each of the sub-volumes
Problems