Main Content

Negative Binomial Distribution

Fit parameters of the negative binomial distribution to data, evaluate the distribution or its inverse, generate pseudorandom samples

Statistics and Machine Learning Toolbox™ offers multiple ways to work with the negative binomial distribution.

  • Create a NegativeBinomialDistribution object and use NegativeBinomialDistribution object functions.

  • Use distribution-specific functions with specified distribution parameters. The functions can accept parameters of multiple negative binomial distributions.

  • Use the generic distribution functions with the specified distribution name "Negative Binomial" and corresponding parameters.

To learn about the negative binomial distribution, see Negative Binomial Distribution.


expand all

makedistCreate probability distribution object
fitdistFit probability distribution object to data
distributionFitterOpen Distribution Fitter app
cdfCumulative distribution function
gatherGather properties of Statistics and Machine Learning Toolbox object from GPU (Since R2020b)
icdfInverse cumulative distribution function
iqrInterquartile range of probability distribution
meanMean of probability distribution
medianMedian of probability distribution
negloglikNegative loglikelihood of probability distribution
paramciConfidence intervals for probability distribution parameters
pdfProbability density function
plotPlot probability distribution object (Since R2022b)
proflikProfile likelihood function for probability distribution
randomRandom numbers
stdStandard deviation of probability distribution
truncateTruncate probability distribution object
varVariance of probability distribution
nbincdfNegative binomial cumulative distribution function
nbinpdfNegative binomial probability density function
nbininvNegative binomial inverse cumulative distribution function
nbinstatNegative binomial mean and variance
nbinfitNegative binomial parameter estimates
nbinrndNegative binomial random numbers
cdfCumulative distribution function
icdfInverse cumulative distribution function
pdfProbability density function
randomRandom numbers
mleMaximum likelihood estimates


NegativeBinomialDistributionNegative binomial distribution object


  • Negative Binomial Distribution

    The negative binomial distribution models the number of failures before a specified number of successes is reached in a series of independent, identical trials.