The OpenD Programming Language

negativeBinomialCDF

Computes the negative binomial cumulative distribution function (CDF).

@safe pure nothrow @nogc
T
negativeBinomialCDF
(
T
)
(
const size_t k
,
const size_t r
,
const T p
)
if (
isFloatingPoint!T
)

Parameters

k size_t

value to evaluate CDF (e.g. number of "heads")

r size_t

number of successes until stopping

p T

true probability

Examples

import mir.test: shouldApprox;

4.negativeBinomialCDF(6, 3.0 / 4).shouldApprox == 0.9218731;

See Also

Meta