Generates a pseudorandom number from a standard exponential distribution.

Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.0.0

Syntax

C#
public virtual double NextExponential()
Visual Basic (Declaration)
Public Overridable Function NextExponential As Double
Visual C++
public:
virtual double NextExponential()

Return Value

A double which specifies a pseudorandom number from a standard exponential distribution.

Remarks

The probability density function is f(x) = e^{-x}; for x \gt 0.

NextExponential uses an antithetic inverse CDF technique; that is, a uniform random deviate U is generated and the inverse of the exponential cumulative distribution function is evaluated at 1.0 - U to yield the exponential deviate.

Deviates from the exponential distribution with mean THETA can be generated by using NextExponential and then multiplying the result by THETA.

See Also