In statistics and computer software, a convolution random number generator is a pseudo-random number sampling method that can be used to generate random variates from certain classes of probability distribution.
However, faster algorithms may be obtainable for the same distributions by other more complicated approaches.
Consider the problem of generating a random variable with an Erlang distribution,
This problem is equivalent to generating a random number for a special case of the Gamma distribution, in which the shape parameter takes an integer value.
samples using a random number generator for the exponential distribution: if