jstat/jstat — pull request #83 by adamnovak (2014-07-22 20:53:31+00:00)
Title: Improved Hypergeometric CDF and PDF

I've successfully re-implemented the algorithm from for the hypergeometric PDF, although I still don't really understand it. It passes the unit tests, so it must be right.

I've re-implemented PDF in terms of CDF for the hypergeometric distribution, to take advantage of the new algorithm.

To be extra sure it's right, I added some unit tests to compare against the old implementations of the CDF and PDF for a wide range of parameter values (when the old implementation doesn't return NaN). They appear to pass.