User:TerryM--re/sandbox

In probability theory and statistics, the negative binomial distribution is a discrete probability distribution on the set {0, 1, 2, ...} with two parameters which we will denote by p and r. It is similar to the Poisson distribution but has greater variance than the mean.

The special case when r is an integer is known as the Pascal distribution (after Blaise Pascal). This represents the number of successes in a sequence of independent and identically distributed Bernoulli trials before a specified (non-random) number of failures (denoted r) occurs. I.e. each trial has two possible results which we may call 'success' and 'failure' and the probability of a success, p, is constant. In this case r is usually known and we often would like to estimate p.

It is important to check what convention is used as there are alternatives that result in slight variations in the formulae. The variable is sometimes the number of trials and the term Pascal distribution is often reserved for this case. Also success and failure are sometimes reversed.

When r is not necessarily an integer the distribution is also known as the Polya distribution (for George Pólya) and we usually wish to estimate both r and p. It may be derived as a mixture of Poisson variates with the mean having a gamma distribution (density function A&lambda;^(&alpha-1);exp(-&lambda;/&beta;). It may also be derived a sum of independent observations from a logarithmic series distribution (mass function Ap^k/k) where the number of terms has a Poisson distribution.

The Polya distribution is often a better model for occurrences of “contagious” discrete events, like tornado outbreaks, than the Poisson distribution by allowing the mean and variance to be different, unlike the Poisson. “Contagious” events have positively correlated occurrences causing a larger variance than if the occurrences were independent, due to a positive covariance term.

This has applications to a wide range of fields including: biology, birth-death processes, ecology, entomology, epidemiology, information sciences, meteorology and psychology.