what


MONTE CARLO INTEGRATION, ctd

The part that gave trouble is this:

A better method is Van Neumann rejection which is good in multiple dimensions, although we will take a one-dimensional example to explain it. If we want x values between 0 and 1 with distribution w(x), we select w'(x) a positive function > than w(x) over this region. For example w'(x) could be a constant greater than the maximum value of w anywhere in the region. If we now generate points in the two dimensional space that uniformly fill the area under the curve w'(x), and ``accept'' only those under w(x) then the accepted points will be distributed according to w(x). In practice two random variables are chosen, one (xi) distributed proportionally to w' and the other, t, uniformly on [0,1]. The value xi is accepted if t is less than the ratio w(xi)/w'(xi). If a point is rejected we go on and select a new one.

The concept that is giving trouble, I think is the ``why fill a 2d space''. The answer is, I think that although we draw in 2d we only use the x part of it, for example the xi. However we need the t (or y) value to get the right number of xi values according to w. The point is that we are not using 2d points, just drawing points in the 2d space and using their x values if the y falls below w' in order to get the right distribution.

I guess this was not as obvious as I thought it was.