@stdlib/stats
Version:
Standard library statistical functions.
70 lines (53 loc) • 1.48 kB
Plain Text
{{alias}}( x, x0, Ɣ )
Evaluates the natural logarithm of the cumulative distribution function
(logCDF) for a Cauchy distribution with location parameter `x0` and scale
parameter `Ɣ` at a value `x`.
If provided `NaN` as any argument, the function returns `NaN`.
If provided `Ɣ <= 0`, the function returns `NaN`.
Parameters
----------
x: number
Input value.
x0: number
Location parameter.
Ɣ: number
Scale parameter.
Returns
-------
out: number
Natural logarithm of the CDF.
Examples
--------
> var y = {{alias}}( 4.0, 0.0, 2.0 )
~-0.16
> y = {{alias}}( 1.0, 0.0, 2.0 )
~-0.435
> y = {{alias}}( 1.0, 3.0, 2.0 )
~-1.386
> y = {{alias}}( NaN, 0.0, 2.0 )
NaN
> y = {{alias}}( 1.0, 2.0, NaN )
NaN
> y = {{alias}}( 1.0, NaN, 3.0 )
NaN
{{alias}}.factory( x0, Ɣ )
Returns a function for evaluating the natural logarithm of the cumulative
distribution function (logCDF) of a Cauchy distribution with location
parameter `x0` and scale parameter `Ɣ`.
Parameters
----------
x0: number
Location parameter.
Ɣ: number
Scale parameter.
Returns
-------
logcdf: Function
Function to evaluate the natural logarithm of CDF.
Examples
--------
> var mylogCDF = {{alias}}.factory( 1.5, 3.0 );
> var y = mylogCDF( 1.0 )
~-0.804
See Also
--------