Function negBinomCDF
Negative binomial distribution.
double negBinomCDF
(
ulong k,
ulong n,
double p
);
Returns the sum of the terms 0 through k of the negative binomial distribution:
j=0, k n+j-1, j p, n (1-p), j ???? In mathworld, it is j=0, k n+j-1, j-1 p, j (1-p), n
In a sequence of Bernoulli trials, this is the probability that k or fewer failures precede the n-th success.
The arguments must be positive, with 0 < p < 1 and r>0.
The Geometric Distribution is a special case of the negative binomial distribution.
geometricDistribution(k, p) = negativeBinomialDistribution(k, 1, p);
References
http://mathworld.wolfram.com/NegativeBinomialDistribution.html