The OpenD Programming Language

negativeBinomialCCDF

Computes the negative binomial complementary cumulative distribution function (CCDF).

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

Parameters

k size_t

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

r size_t

number of successes until stopping

p T

true probability

Examples

import mir.test: shouldApprox;

4.negativeBinomialCCDF(6, 3.0 / 4).shouldApprox == 0.07812691;

See Also

Meta