Negative Binomial Distribution#
The negative binomial random variable with parameters and can be defined as the number of extra independent trials (beyond ) required to accumulate a total of successes where the probability of a success on each trial is Equivalently, this random variable is the number of failures encountered while accumulating successes during independent trials of an experiment that succeeds with probability Thus,
Recall that is the incomplete beta integral.
Implementation: scipy.stats.nbinom