Simulation and modeling - Old Questions
6. What do you mean by non-uniform random number?
Answer
AI is thinking...
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 c of f(x) on a ≤ x ≤ b.
f(X) ≤ c ∀ 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 μ1 & μ2.