fitting discrete distributions
See original GitHub issueActually we can use scipy.stats.rv_continuous.fit
method to extract the parameters for a theoretical continuous distribution from empirical data, however, it is not implemented for discrete distributions e.g. negative binomial and Poisson… may it be implemented in a near future?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:28 (20 by maintainers)
Top Results From Across the Web
Goodness-of-Fit Tests for Discrete Distributions
Discrete distributions have a finite number of values. Learn how to perform goodness-of-fit tests to see if your data fit various discrete distributions....
Read more >How to fit a discrete distribution to count data? - Cross Validated
Methods of fitting discrete distributions ; 1) Maximum Likelihood ; 2) Method of moments ; 3) Minimum chi-square.
Read more >Fitting a distribution for a discrete variable | Vose Software
This section discusses techniques for fitting a distribution to observations for a discrete variable. Before proceeding we suggest that you review the ...
Read more >FITTING DISCRETE DISTRIBUTIONS ON THE FIRST TWO ...
Introduction. A common way to t a continuous distribution on the mean,. EX, and the coe cient of variation, cX, of a given...
Read more >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...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
discrete distributions taken from here: https://github.com/scipy/scipy/blob/master/scipy/stats/_distr_params.py#L115
\hat{p}= \frac{T}{1+\sqrt{1+T}}
whereT=\sum_{i=1}^n | x_i|
eqn (32) in linked paper and immediately afterwards they state that MLE = MME and they also give a distributional result. ^3 the MLE for Skellam is a special case of the root finding problem considered in section 3.2 of that paper, corresponds to COM-Poisson with the \nu_i =1 for i =1,2Boltzmann note: Boltzmann is a truncated geometric distribution. An MLE for the probability of a geometric exists, so incorporation of a truncation point should be straightfoward. Estimation of truncation point is not known (to me) but also straightforward to work out. Joint estimation of truncation point and probability would need to be worked out. Unclear to me at this time if there are technical difficulties in this joint case.
Note: the remaining distributions: logseries, hypergeometric, planck, zipf, may exist but I was unable to find references.
Existence of estimators in discrete case is better than I expected but note that if a
fit
method is added this could preclude inclusion of some distributions. For example, there is an open PR with a poisson-binomial distribution, AFAIK there is no known MLE for poisson-binomial.After doing the research I’ve gone from a -0.0 on this to a +0.3 on adding the fit. I’d recommend to open a discussion thread on the topic on the scipy-dev list. You’ll reach more people there than here and get better opinions than mine. 😃
In the meantime:
I am curious how well something so simple works, so if you try it out, let me know how it goes.