Abstract
Although the noncentral hypergeometric distribution underlies conditional inference for 2 × 2 tables, major statistical packages lack support for this distribution. This article introduces fast and stable algorithms for computing the noncentral hypergeometric distribution and for sampling from it. The algorithms avoid the expensive and explosive combinatorial numbers by using a recursive relation. The algorithms also take advantage of the sharp concentration of the distribution around its mode to save computing time. A modified inverse method substantially reduces the number of searches in generating a random deviate. The algorithms are implemented in a Java class, Hypergeometric, available on the World Wide Web.
Original language | English (US) |
---|---|
Pages (from-to) | 366-369 |
Number of pages | 4 |
Journal | American Statistician |
Volume | 55 |
Issue number | 4 |
DOIs | |
State | Published - Nov 1 2001 |
All Science Journal Classification (ASJC) codes
- Statistics and Probability
- General Mathematics
- Statistics, Probability and Uncertainty