This is documentation for an old release of SciPy (version 1.7.0). Search for this page in the documentation of the latest stable release (version 1.15.1).
Negative Hypergeometric Distribution¶
Consider a box containing \(M\) balls: \(n\) red and \(M-n\) blue. We randomly sample balls from the box, one at a time and without replacement, until we have picked \(r\) blue balls. nhypergeom is the distribution of the number of red balls \(k\) we have picked.
for \(k \in 0, 1, 2, ..., n\), where the binomial coefficients are defined as,
The cumulative distribution, survivor function, hazard function, cumulative hazard function, inverse distribution function, moment generating function, and characteristic function on the support of \(k\) are mathematically intractable.
Implementation: scipy.stats.nhypergeom