RandomNextLogarithmic Method |
Generate a pseudorandom number from a logarithmic distribution.
Namespace: Imsl.StatAssembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax public virtual int NextLogarithmic(
double a
)
Public Overridable Function NextLogarithmic (
a As Double
) As Integer
public:
virtual int NextLogarithmic(
double a
)
abstract NextLogarithmic :
a : float -> int
override NextLogarithmic :
a : float -> int
Parameters
- a
- Type: SystemDouble
A double which specifies the parameter of the logarithmic
distribution, .
Return Value
Type:
Int32
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.
See Also