Generate a pseudorandom number from a logarithmic distribution.
Namespace:
Imsl.Stat
Assembly:
ImslCS (in ImslCS.dll) Version: 6.5.0.0
Syntax
C# |
---|
public virtual int NextLogarithmic( double a ) |
Visual Basic (Declaration) |
---|
Public Overridable Function NextLogarithmic ( _ a As Double _ ) As Integer |
Visual C++ |
---|
public: virtual int NextLogarithmic( double a ) |
Parameters
- a
- Type: System..::.Double
A double which specifies the parameter of the logarithmic distribution,.
Return Value
A int which specifies a pseudorandom number from a logarithmic distribution.
Remarks
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.