Search code examples
pythonscipystatisticsstatsmodelsprobability-distribution

statsmodels - Builtin probability distributions


We can plot common probability distributions using Scipy module. However, is it possible to do the same task using Statsmodels library?

For example - Scipy has inbuilt functions for Binomial distribution, Uniform distribution and as well as for Normal distribution.

Similarly, is there any built in alternative to achieve the same using statsmodels?


Solution

  • statsmodels is not trying to duplicate scipy.stats (*). So there is no equivalent to scipy.stats.distributions.

    The emphasis in statsmodels is in regression models for different distributions. So there is some overlap in that statsmodels uses normal distribution, discrete distributions like Binomial, Poisson and NegativeBinomial or distribution families for generalized linear models.

    There are also a few cases where statmodels supports distribution functionality that is not available in scipy.

    (*) There is overlap and duplication between statsmodels and scipy.stats in some of the basic statistics and hypothesis tests like t-tests with different options and extensions in some cases.