Beta-Negative Binomial Distribution#

The beta-negative binomial distribution is a negative binomial distribution with a probability of success p that follows a beta distribution. The probability mass function for betanbinom, defined for \(k\geq 0\), is:

\[f(k; n, a, b) = \binom{n + k - 1}{k} \frac{B(a + n, b + k)}{B(a, b)}\]

for k in {0, 1,...}, where \(B(a, b)\) is the Beta function.

In the limiting case of \(n = 1\), the beta-negative binomial distribution reduces to a beta-geometric distribution with the probability mass function:

\[f(k; a, b) = \frac{B(a + 1, b + k)}{B(a, b)}\]

Implementation: scipy.stats.betanbinom