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

By Liao, J. G.; Rosen, Ori | The American Statistician, November 2001 | Go to article overview

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


Liao, J. G., Rosen, Ori, The American Statistician


**********

Although the noncentral hypergeometric distribution underlies conditional inference for 2 x 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.

KEY WORDS: Inverse method; Recursive methods; 2 x 2 table.

1. INTRODUCTION

The noncentral hypergeometric distribution underlies conditional inference of 2 x 2 tables. Consider, for example, a clinical trial that compares two treatments. Let the number of subjects allocated to the two treatment groups be [n.sub.1] and [n.sub.2], respectively, and the number of subjects with a positive outcome be [Y.sub.1] and [Y.sub.2]. A natural model is then [Y.sub.i] ~ Binomial([n.sub.i], [[pi].sub.i]), i = 1, 2. For this design, the odds ratio

[psi] = [[pi].sub.1](1 - [[pi].sub.2])/[[pi].sub.2](1 - [[pi].sub.1]),

is often used to measure the relationship between treatment out come and treatment group. Let [m.sub.1] be the sum of the observed value of [Y.sub.1] and [Y.sub.2]. The conditional inference is based on the conditional distribution of [Y.sub.1] given [Y.sub.1] + [Y.sub.2] = [m.sub.1]

[p.sub.i] [equivalent to] Pr([Y.sub.1] = i\[Y.sub.1] + [Y.sub.2] = [m.sub.1])

[MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII]

where l = max(0, [m.sub.1] - [n.sub.2]) and u = min([n.sub.1], [m.sub.1]). For the special case of [psi] = 1, that is, [[pi].sub.1] = [[pi].sub.2], the noncentral distribution reduces to the familiar (central) hypergeometric distribution, on which Fisher's exact test is based. The same formulation applies to conditional inference of 2 x 2 tables where each cell follows a Poisson distribution. See, for example, Fisher (1935), Breslow and Day (1980), Agresti (1992), and McCullagh and Nelder (1989, chap. 7). The noncentral hypergeometric distribution thus has wide applications in medical, epidemiological, and social studies.

This article studies efficient algorithms for computing and sampling from the noncentral hypergeometric distribution. The proposed algorithms are implemented in a Java class Hypergeometric that provides methods (routines) for computing the probability mass, the cumulative distribution, the mean and variance, and for generating random deviates. The routines for computing the mean and variance are useful for estimating the odds ratio via maximum likelihood (McCullagh and Nelder 1989, chap. 7), and the routines for the probability mass and cumulative distribution facilitate the construction of confidence intervals and power calculation of associated tests (Vollset, Hirji, and Elash-hoff 1991). The routines for generating random deviates can be used in simulation-based methods for inference in more complicated problems (McDonald, Smith, and Forster 1999). The algorithms use a recursive relation to avoid the expensive and explosive combinatorial numbers. The algorithms also take advantage of the sharp concentratio n of the distribution around its mode in order to save computing time. A modified inverse method is developed for generating random deviates. We hope to dispel the perception that, except when the margins are small, the computation of the distribution is difficult (see McCullagh and Nelder 1989, p. 259; Breslow and Cologne 1986; McDonald, Smith, and Forster 1999). These perceived difficulties led to the development of special algorithms for computing the mean and variance of the distribution that avoid computing the probability distribution (Satten and Kupper 1990; Liao 1992). …

The rest of this article is only available to active members of Questia

Sign up now for a free, 1-day trial and receive full access to:

  • Questia's entire collection
  • Automatic bibliography creation
  • More helpful research tools like notes, citations, and highlights
  • Ad-free environment

Already a member? Log in now.

Notes for this article

Add a new note
If you are trying to select text to create highlights or citations, remember that you must now click or tap on the first word, and then click or tap on the last word.
One moment ...
Default project is now your active project.
Project items

Items saved from this article

This article has been saved
Highlights (0)
Some of your highlights are legacy items.

Highlights saved before July 30, 2012 will not be displayed on their respective source pages.

You can easily re-create the highlights by opening the book page or article, selecting the text, and clicking “Highlight.”

Citations (0)
Some of your citations are legacy items.

Any citation created before July 30, 2012 will labeled as a “Cited page.” New citations will be saved as cited passages, pages or articles.

We also added the ability to view new citations from your projects or the book or article where you created them.

Notes (0)
Bookmarks (0)

You have no saved items from this article

Project items include:
  • Saved book/article
  • Highlights
  • Quotes/citations
  • Notes
  • Bookmarks
Notes
Cite this article

Cited article

Style
Citations are available only to our active members.
Sign up now to cite pages or passages in MLA, APA and Chicago citation styles.

(Einhorn, 1992, p. 25)

(Einhorn 25)

1

1. Lois J. Einhorn, Abraham Lincoln, the Orator: Penetrating the Lincoln Legend (Westport, CT: Greenwood Press, 1992), 25, http://www.questia.com/read/27419298.

Cited article

Fast and Stable Algorithms for Computing and Sampling from the Noncentral Hypergeometric Distribution
Settings

Settings

Typeface
Text size Smaller Larger Reset View mode
Search within

Search within this article

Look up

Look up a word

  • Dictionary
  • Thesaurus
Please submit a word or phrase above.
Print this page

Print this page

Why can't I print more than one page at a time?

Full screen

matching results for page

Cited passage

Style
Citations are available only to our active members.
Sign up now to cite pages or passages in MLA, APA and Chicago citation styles.

"Portraying himself as an honest, ordinary person helped Lincoln identify with his audiences." (Einhorn, 1992, p. 25).

"Portraying himself as an honest, ordinary person helped Lincoln identify with his audiences." (Einhorn 25)

"Portraying himself as an honest, ordinary person helped Lincoln identify with his audiences."1

1. Lois J. Einhorn, Abraham Lincoln, the Orator: Penetrating the Lincoln Legend (Westport, CT: Greenwood Press, 1992), 25, http://www.questia.com/read/27419298.

Cited passage

Welcome to the new Questia Reader

The Questia Reader has been updated to provide you with an even better online reading experience.  It is now 100% Responsive, which means you can read our books and articles on any sized device you wish.  All of your favorite tools like notes, highlights, and citations are still here, but the way you select text has been updated to be easier to use, especially on touchscreen devices.  Here's how:

1. Click or tap the first word you want to select.
2. Click or tap the last word you want to select.

OK, got it!

Thanks for trying Questia!

Please continue trying out our research tools, but please note, full functionality is available only to our active members.

Your work will be lost once you leave this Web page.

For full access in an ad-free environment, sign up now for a FREE, 1-day trial.

Already a member? Log in now.