AN ACCURATE COMPUTATION OF THE HYPERGEOMETRIC DISTRIBUTION FUNCTION

Authors
Citation
T. Wu, AN ACCURATE COMPUTATION OF THE HYPERGEOMETRIC DISTRIBUTION FUNCTION, ACM transactions on mathematical software, 19(1), 1993, pp. 33-43
Citations number
21
Categorie Soggetti
Computer Sciences",Mathematics
ISSN journal
00983500
Volume
19
Issue
1
Year of publication
1993
Pages
33 - 43
Database
ISI
SICI code
0098-3500(1993)19:1<33:AACOTH>2.0.ZU;2-H
Abstract
The computation of the cumulative hypergeometric distribution function is of interest to many researchers who are working in the computation al sciences and related areas. Presented here is a new method for comp uting this function that applies prime number factorization to the fac torials. We also apply cancellation to the numerator and denominator t o reduce the computational complexity of the initial, the tail end, or weighted probabilities to achieve maximum accuracy. The new method in cludes two algorithms, one using recursion and the other using iterati on. These two algorithms are machine independent; precision is arbitra ry, subject to storage limitation. The development of the algorithms i s discussed, and some test results and the comparison of these two alg orithms are given. To implement both algorithms, we use the Ada progra mming language that is an American National Standard Institute standar dized language. The language has special features such as exception ha ndling and tasks. Exception handling is used to make programming easie r and to prevent overflow or underflow conditions during the execution of the program. Tasks are used to compute the numerator and denominat or concurrently, and to maximize the possible number of integer multip lications in the numerator and denominator. All of the computations ca n be done on currently available machines, and the time consumed by th ese computations remains reasonably small.