Negative binomial distribution describes a sequence of i.i.d. Bernoulli trials, repeated until a predefined, non-random number of successes occurs.
nbinom takes \(n\) and \(p\) as shape parameters where n is the number of successes, whereas p is the probability of a single success.
pmf(k, n, p, loc=0) Probability mass function.
logpmf(k, n, p, loc=0) Log of the probability mass function.
cdf(k, n, p, loc=0) Cumulative distribution function.
logcdf(k, n, p, loc=0) Log of the cumulative distribution function.
sf(k, n, p, loc=0) Survival function (also defined as 1 - cdf, but sf is sometimes more accurate).
logsf(k, n, p, loc=0) Log of the survival function.
stats(n, p, loc=0, moments='mv') Mean('m'), variance('v'), skew('s'), and/or kurtosis('k').