[SciPy-User] why do the discrete distributions not have a `fit`?

josef.pktd@gmai... josef.pktd@gmai...
Thu May 10 19:04:44 CDT 2012

Why do the discrete distributions not have a `fit` method like the
continuous distributions?

currently it's a bug in the documentation

in statsmodels, we fit several of the discrete distributions.

How about discrete parameters?   (in analogy to the erlang discussion)

hypergeom is based on a story about marbles or balls
but why should we care, it's just a discrete distribution with 3 shape
parameters, isn't it?

fractional marbles ?

>>> nn = np.linspace(4.5, 8, 101)
>>> pmf = [stats.hypergeom.pmf(5, 10.8, n, 8.5) for n in nn]

>>> plt.plot(nn, pmf, '-o')
>>> plt.title("pmf of hypergeom as function of parameter n")

Doesn't look like there are any problems, and the likelihood function
is nicely concave.

conclusion: scipy.stats doesn't have a hypergeometric distribution,
but a generalized version that is defined on a real parameter space.

(so what's the point? Sorry, I was just getting distracted while
looking for `fit`.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hypergeom_like.png
Type: image/png
Size: 32561 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-user/attachments/20120510/491d2f1d/attachment-0001.png 

More information about the SciPy-User mailing list