This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Negative binomial parameter estimates


parmhat = nbinfit(data)
[parmhat,parmci] = nbinfit(data,alpha)
[...] = nbinfit(data,alpha,options)


parmhat = nbinfit(data) returns the maximum likelihood estimates (MLEs) of the parameters of the negative binomial distribution given the data in the vector data.

[parmhat,parmci] = nbinfit(data,alpha) returns MLEs and 100(1-alpha) percent confidence intervals. By default, alpha = 0.05, which corresponds to 95% confidence intervals.

[...] = nbinfit(data,alpha,options) accepts a structure, options, that specifies control parameters for the iterative algorithm the function uses to compute maximum likelihood estimates. The negative binomial fit function accepts an options structure which you can create using the function statset. Enter statset('nbinfit') to see the names and default values of the parameters that nbinfit accepts in the options structure. See the reference page for statset for more information about these options.


The variance of a negative binomial distribution is greater than its mean. If the sample variance of the data in data is less than its sample mean, nbinfit cannot compute MLEs. You should use the poissfit function instead.

Introduced before R2006a

Was this topic helpful?