# 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.

## Functions

expand all

 `makedist` Create probability distribution object `fitdist` Fit probability distribution object to data `distributionFitter` Open Distribution Fitter app
 `cdf` Cumulative distribution function `gather` Gather properties of Statistics and Machine Learning Toolbox object from GPU (Since R2020b) `icdf` Inverse cumulative distribution function `iqr` Interquartile range of probability distribution `mean` Mean of probability distribution `median` Median of probability distribution `negloglik` Negative loglikelihood of probability distribution `paramci` Confidence intervals for probability distribution parameters `pdf` Probability density function `plot` Plot probability distribution object (Since R2022b) `proflik` Profile likelihood function for probability distribution `random` Random numbers `std` Standard deviation of probability distribution `truncate` Truncate probability distribution object `var` Variance of probability distribution
 `nbincdf` Negative binomial cumulative distribution function `nbinpdf` Negative binomial probability density function `nbininv` Negative binomial inverse cumulative distribution function `nbinstat` Negative binomial mean and variance `nbinfit` Negative binomial parameter estimates `nbinrnd` Negative binomial random numbers
 `cdf` Cumulative distribution function `icdf` Inverse cumulative distribution function `pdf` Probability density function `random` Random numbers `mle` Maximum likelihood estimates

## Objects

 `NegativeBinomialDistribution` Negative binomial distribution object

## Topics

• 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.