negativeBinomialDistribution
negativeBinomialDistribution(
successes,probability):Distribution
Defined in: negative-binomial-distribution.ts:23
The negative binomial distribution — the number of failures before the
successes-th success.
Counting failures rather than trials, so that
negativeBinomialDistribution(1, p) is exactly geometricDistribution(p).
successes need not be an integer; the Pólya form with a real stopping
parameter is the same formula.
Parameters
Section titled “Parameters”successes
Section titled “successes”number
Number of successes to wait for; must be positive.
probability
Section titled “probability”number
Success probability of one attempt, in (0, 1].
Returns
Section titled “Returns”The distribution.
Throws
Section titled “Throws”When successes is not positive, or probability is
outside (0, 1].