[SciPy-Dev] Wallenius' noncentral hypergeometric distribution

Adam Stone arstone208 at gmail.com
Tue Dec 23 14:03:16 EST 2014


Hello,

I recently wrote some python code that involved calculating Wallenius'
noncentral hypergeometric distribution (
http://en.wikipedia.org/wiki/Wallenius%27_noncentral_hypergeometric_distribution
).

This is similar to the scipy.stats.hypergeom distribution, which is applied
to situations like drawing marbles from an urn without replacement, but the
noncentral version introduces unequally-weighted probabilities for drawing
the different types of marbles. What I have is a multivariate
implementation of this (i.e. drawing from 3+ types of marbles). I thought
that it might be a good addition to the scipy.stats module.

My initial implementation is here:
https://github.com/AdamStone/hypergeometric

Obviously the above isn't yet in a form consistent with the other
scipy.stats distributions, but I wanted to check with the mailing list
before committing the time to restructure it. If the list approves, I will
go ahead with implementing it in the manner of the other scipy.stats
distributions.

Thanks,
Adam Stone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20141223/35b7408d/attachment.html>


More information about the SciPy-Dev mailing list