@stdlib/stats
Version:
Standard library statistical functions.
65 lines (50 loc) • 1.33 kB
Plain Text
{{alias}}( x, λ )
Evaluates the natural logarithm of the cumulative distribution function
(CDF) for an exponential distribution with rate parameter `λ` at a value
`x`.
If provided `NaN` as any argument, the function returns `NaN`.
If provided a negative value for `λ`, the function returns `NaN`.
Parameters
----------
x: number
Input value.
λ: number
Rate parameter.
Returns
-------
out: number
Evaluated logCDF.
Examples
--------
> var y = {{alias}}( 2.0, 0.1 )
~-1.708
> y = {{alias}}( 1.0, 2.0 )
~-0.145
> y = {{alias}}( -1.0, 4.0 )
-Infinity
> y = {{alias}}( NaN, 1.0 )
NaN
> y = {{alias}}( 0.0, NaN )
NaN
// Negative rate parameter:
> y = {{alias}}( 2.0, -1.0 )
NaN
{{alias}}.factory( λ )
Returns a function for evaluating the natural logarithm of the cumulative
distribution function (CDF) for an exponential distribution with rate
parameter `λ`.
Parameters
----------
λ: number
Rate parameter.
Returns
-------
logcdf: Function
Logarithm of cumulative distribution function (CDF).
Examples
--------
> var mylogCDF = {{alias}}.factory( 0.5 );
> var y = mylogCDF( 3.0 )
~-0.252
See Also
--------