# NegativeBinomialDistribution

represents a negative binomial distribution with parameters n and p.

# Details • The probability for value in a negative binomial distribution is for non-negative integers, and is zero otherwise. »
• NegativeBinomialDistribution allows n to be any positive real number and p to be any positive real number less than or equal to 1.
• If n is a positive integer, gives the distribution of the number of failures in a sequence of trials with success probability p before n successes occur.
• NegativeBinomialDistribution for noninteger parameter n is also known as Pólya distribution.
• NegativeBinomialDistribution allows n and p to be a dimensionless quantity. »
• NegativeBinomialDistribution can be used with such functions as Mean, CDF, and RandomVariate. »

# Background & Context

• represents a discrete statistical distribution defined for integer values and determined by the positive real parameters n and p (where ). The negative binomial distribution has a probability density function (PDF) that is discrete and unimodal. Depending on context, the Pascal and PólyaAeppli distributions (PascalDistribution and PolyaAeppliDistribution, respectively) may each be referred to as negative binomial distributions, though each is distinct from the negative binomial distribution discussed above.
• When n is a positive integer, gives the distribution of the number of failures in a sequence of trials with success probability p before n successes occur. This is closely related to the Pascal distribution (PascalDistribution) and dates back to Pascal's work in the 17 century. For noninteger parameter n, the negative binomial distribution is also known as the Pólya distribution. For general n, several distributions dating to the 1940s have been proposed and referred to as negative binomial distributions, though the above-stated NegativeBinomialDistribution (which was proposed considerably later) is the most widely used in modern applications. The negative binomial distribution has played an increasingly significant role in probability and stochastics since the 1990s and has also been used to model phenomena including accident statistics, birth-and-death processes, consumer expenditure, biometrics, and retail inventory management.
• RandomVariate can be used to give one or more machine- or arbitrary-precision (the latter via the WorkingPrecision option) pseudorandom variates from a negative binomial distribution. Distributed[x,NegativeBinomialDistribution[n,p]] , written more concisely as xNegativeBinomialDistribution[n,p], can be used to assert that a random variable x is distributed according to a negative binomial distribution. Such an assertion can then be used in functions such as Probability, NProbability, Expectation, and NExpectation.
• The probability density and cumulative distribution functions for negative binomial distributions may be given using PDF[NegativeBinomialDistribution[n,p]] and CDF[NegativeBinomialDistribution[n,p]]. The mean, median, variance, covariance, raw moments, and central moments may be computed using Mean, Median, Variance, Covariance, Moment, and CentralMoment, respectively.
• DistributionFitTest can be used to test if a given dataset is consistent with a negative binomial distribution, EstimatedDistribution to estimate a negative binomial parametric distribution from given data, and FindDistributionParameters to fit data to a negative binomial distribution. ProbabilityPlot can be used to generate a plot of the CDF of given data against the CDF of a symbolic negative binomial distribution and QuantilePlot to generate a plot of the quantiles of given data against the quantiles of a symbolic negative binomial distribution.
• TransformedDistribution can be used to represent a transformed negative binomial distribution, CensoredDistribution to represent the distribution of values censored between upper and lower values, and TruncatedDistribution to represent the distribution of values truncated between upper and lower values. CopulaDistribution can be used to build higher-dimensional distributions that contain a negative binomial distribution, and ProductDistribution can be used to compute a joint distribution with independent component distributions involving negative binomial distributions.
• NegativeBinomialDistribution is related to a number of other distributions. It is a univariate case of the more general NegativeMultinomialDistribution in the sense that the PDF of with respect to a variable x is precisely the same as that of NegativeMultinomialDistribution[n,{1-p}] written in terms of the vector {x}. is identically , while NegativeBinomialDistribution can be obtained as a transformed distribution (TransformedDistribution) of both PascalDistribution and GeometricDistribution. Using a parameter mixture distribution (ParameterMixtureDistribution), NegativeBinomialDistribution can be realized from PoissonDistribution, GammaDistribution, BetaDistribution, and BetaPrimeDistribution, while also being related to CompoundPoissonDistribution via more complex transformations. NegativeBinomialDistribution is also related to BinomialDistribution, MultinomialDistribution, BernoulliDistribution, BetaBinomialDistribution, HypergeometricDistribution, and PoissonDistribution.

# Examples

open all close all

## Basic Examples(3)

Probability mass function:

 In:= Out= In:= Out= Cumulative distribution function:

 In:= Out= In:= Out= Mean and variance:

 In:= Out= In:= Out= ## Possible Issues(2)

Introduced in 2007
(6.0)
|
Updated in 2016
(10.4)