MATLAB: Parameters Negative Binomial Distribution

MATLABstatistics

How can I calculate p and r of the Negative Binomial Distribution? I have a discrete data. I will appreciate someone can answer. Thank you.

Best Answer

If you have the Statistics Toolbox, use nbinfit ...