(6 points) Plain Monte Carlo integration
(3 points)
(1 point)
If N<nmin return N-point plain Monte Carlo estimate of integral and variance; Sample nmin points and estimate the integral and the variance; Find the dimension with largest sub-variance; Subdivide the volume along this dimension; Divide the remaning points between the two sub-volumes (proportional to sub-variances); Dispatch two recursive calls on the sub-volumes; Estimate the grand integral and grand error; Return the grand integral and the grand error;