Evaluates the cumulative distribution function (CDF) for an Erlang distribution with shape parameter k
and rate parameter lambda
at a value x
.
k
, the function returns NaN
.lambda
, the function returns NaN
.input value
shape parameter
rate parameter
evaluated CDF
var y = cdf( 2.0, 1, 1.0 );
// returns ~0.865
var y = cdf( 2.0, 3, 1.0 );
// returns ~0.323
var y = cdf( 2.0, 2.5, 1.0 );
// returns NaN
var y = cdf( -1.0, 2, 2.0 );
// returns 0.0
var y = cdf( +Infinity, 4, 2.0 );
// returns 1.0
var y = cdf( -Infinity, 4, 2.0 );
// returns 0.0
var y = cdf( NaN, 0, 1.0 );
// returns NaN
var y = cdf( 0.0, NaN, 1.0 );
// returns NaN
var y = cdf( 0.0, 0, NaN );
// returns NaN
var y = cdf( 2.0, -1, 1.0 );
// returns NaN
var y = cdf( 2.0, 1, -1.0 );
// returns NaN
Returns a function for evaluating the cumulative distribution function (CDF) for an Erlang distribution with shape parameter k
and rate parameter lambda
.
shape parameter
rate parameter
CDF
var mycdf = cdf.factory( 2, 0.1 );
var y = mycdf( 12.0 );
// returns ~0.337
y = mycdf( 8.0 );
// returns ~0.191
Interface for the cumulative distribution function (CDF) of an Erlang distribution.