Fast and Stable Algorithms for Computing and Sampling From the Noncentral Hypergeometric Distribution

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.

[1]  William Feller,et al.  An Introduction to Probability Theory and Its Applications , 1967 .

[2]  P W Smith,et al.  Exact tests of goodness of fit of log-linear models for rates. , 1999, Biometrics.

[3]  Duncan Temple Lang The Omegahat Environment: New Possibilities for Statistical Computing , 2000 .

[4]  R. Lund Algorithm AS 152: Cumulative Hypergeometric Probabilities , 1980 .

[5]  William Feller,et al.  An Introduction to Probability Theory and Its Applications , 1951 .

[6]  H. Busch METHODS IN CANCER RESEARCH , 1969 .

[7]  R. Fisher,et al.  The Logic of Inductive Inference , 1935 .

[8]  N. Breslow,et al.  Methods of estimation in log odds ratio regression models. , 1986, Biometrics.

[9]  Eric R. Ziegel,et al.  Generalized Linear Models , 2002, Technometrics.

[10]  Kenneth Lange,et al.  Numerical analysis for statisticians , 1999 .

[11]  N. E. Breslow Statistical Methods in Cancer Research , 1986 .

[12]  P. McCullagh,et al.  Generalized Linear Models , 1992 .

[13]  A. Agresti [A Survey of Exact Inference for Contingency Tables]: Rejoinder , 1992 .

[14]  Continued fraction representation for expected cell counts of a 2 x 2 table: a rapid and exact method for conditional maximum likelihood estimation. , 1990, Biometrics.

[15]  Robert M. Elashoff,et al.  Fast Computation of Exact Confidence Limits for the Common Odds Ratio in a Series of 2 × 2 Tables , 1991 .

[16]  J. Estève,et al.  Statistical methods in cancer research. Volume IV. Descriptive epidemiology. , 1998, IARC scientific publications.

[17]  Jiangang Liao An algorithm for the mean and variance of the noncentral hypergeometric distribution , 1992 .

[18]  K. Y. Liang,et al.  The Variance of the Mantel-Haenszel Estimator , 1982 .