Probabilities.BernoulliCDF Method

function BernoulliCDF(x: Integer; p: Double): Double;

Bernoulli cumulative distribution function (CDF).

#NameDescription
1xFunction domain, integer
2valid values are 0 or 1.
3pSuccess probability, real value on the closed interval [0,1].

Returns: Double - the Bernoulli cumulative distribution function (CDF). Returns NAN when p is outside [0,1] or x is negative.

Remarks:

Computes the Bernoulli CDF P(X <= x):

CDF(x| p)={ 1-p,  if x=0
          { 1,  if x >= 1

Domain: p in [0,1]. For x<0 or p not in [0,1] the result is NaN. Note that the implementation returns 1 for every x >= 1 (e.g. x=5), not only x=1.

See Also: Probabilities.BernoulliPDF, Probabilities.BernoulliCDFInv, Probabilities.BinomCDF