Generate a pseudorandom number from a logarithmic distribution.
double which specifies the parameter of the logarithmic distribution, A int which specifies a pseudorandom number from a logarithmic distribution.
Method NextLogarithmic generates pseudorandom numbers from a logarithmic distribution with parameter a. The probability function is
for
, and
.
The methods used are described by Kemp (1981) and depend on the value of a. If a is less than 0.95, Kemp's algorithm LS, which is a "chop-down" variant of an inverse CDF technique, is used. Otherwise, Kemp's algorithm LK, which gives special treatment to the highly probable values of 1 and 2, is used.
Random Class | Imsl.Stat Namespace | Example