Simulation and modeling - Old Questions

6.  Explain non-uniform random number generation.

5 marks | Asked in 2067

Non-uniform random variate generation is concerned with the generation of random variables with certain distributions. Such random variables are often discrete, taking values in a countable set, or absolutely continuous, and thus described by a density. The methods used for generating non-uniform random variate are inverse transformation technique and acceptance/rejection technique.


Acceptance/Rejection Method

The rejection method for obtaining samples of random numbers forms a given non-uniform distribution works by generating uniform random numbers repeatedly and accepting only those numbers that meet certain conditions.

The rejection method is applied when the probability density function, f(x), has a lower and upper limit to its range, 'a' and 'b', respectively, and an upper bound 'c'. The method can be specified as follows:

1. Find the maximum value of f(x) on a   b.

        f(X)    x  [a, b]

2. Compute two values μ1μ2 of the uniformity distributed variables, both defined on [a, b] = [0, 1].

3. Compute x0 = a + μ1(b - a)

4. Compute y0 = c μ2

5. If y0 ≤ f(x0), accept x0 as desired output; otherwise reject x0 and repeat the process with two next values μ&  μ2.