Fitting Discrete Distributions to Data With SciPy (Python)



Fitting Discrete Distributions to Data With SciPy (Python)

Fitting Discrete Distributions to Data With SciPy (Python)

Hi everyone! This video is about how to use the Python SciPy library to fit a probably distribution to data, using the Poisson distribution as an example.

NOTE: This video is about fitting DISCRETE distributions (Poisson, geometric, binomial, etc). If you’re trying to fit a CONTINUOUS distribution (normal, gamma, exponential, etc) in SciPy, check out this other video I made that shows an easier built-in method you can use:

https://www.youtube.com/watch?v=IUcvPo2WCB8

UPDATE: After I made this video, SciPy 1.9 was released, which includes a new method that makes it easy to fit distributions to data, and can be used for both continuous and discrete distributions. Here is the link to the documentation for this method:

https://scipy.github.io/devdocs/reference/generated/scipy.stats.fit.html#scipy.stats.fit

All the code from my videos is available on my Github:
https://github.com/mikesaint-antoine/Comp_Bio_Tutorials

Let me know if you have any questions! Thanks for watching!

Comments are closed.