pymc-devs / pymc2

THIS IS THE **OLD** PYMC PROJECT (VERSION 2). PLEASE USE PYMC INSTEAD:
http://pymc-devs.github.com/pymc/
Other
879 stars 229 forks source link

Bug in Multivariate Hypergeometric? #139

Open kyleabeauchamp opened 7 years ago

kyleabeauchamp commented 7 years ago

AFAIK, the multivariate hypergeometric should depend on the number of draws performed (n, in the wikipedia nomenclature) and the number of each marble type (K_i, in the wikipedia nomenclature).

However, the pymc RV object only has m as a parent (see docstring below). Interestingly, the expected value and moment calculations (https://github.com/pymc-devs/pymc/blob/0c9958838014e2b5693c56ebd4fc32a96632f189/pymc/distributions.py#L1845) seem OK, it's just the logP that's wrong (https://github.com/pymc-devs/pymc/blob/0c9958838014e2b5693c56ebd4fc32a96632f189/pymc/distributions.py#L1882).

pm.MultivariateHypergeometric(self, *args, **kwds)
Docstring:     
M = MultivariateHypergeometric(name, m, value=None, observed=False, trace=True, rseed=True, doc=None, verbose=-1, debug=False)

Stochastic variable with MultivariateHypergeometric distribution.
Parents are: m.