Pages

Tuesday, August 10, 2010

What is acceptance-rejection algorithm

acceptance-rejection algorithm A method for generating values of a "continuous random variable for use in a "simulation. Suppose that
the random variable X, which takes values in the interval (a, b), has "probability density function f. Denote the maximum value of f(x) by M. Let u and v be two random numbers *uniformly distributed in the interval (0, l). Write r = a + (b - a)u and s = Mv, so that r and s are uniformly distributed on (a, b) and (0, M), respectively. Calculate f(r). If f(r) > s then r is accepted as a value of X. Otherwise, it is rejected and a new pair of values is taken for u and v.

No comments:

Post a Comment