|
|
Line 1: |
Line 1: |
| [[Image:FishersNoncentralHypergeometric1.png|right|thumb|300px|
| | Wilber Berryhill is the name his mothers and fathers gave him and he completely digs that name. I've usually cherished residing in Mississippi. The preferred hobby for him and his children is to play lacross and he would by no means give it up. She functions as a journey agent but quickly she'll be on her personal.<br><br>Here is my web site: free online tarot card readings ([http://kpupf.com/xe/talk/735373 over at this website]) |
| Probability mass function for Fisher's noncentral hypergeometric distribution for different values of the odds ratio ω.<br />
| |
| ''m''<sub>1</sub> = 80, ''m''<sub>2</sub> = 60, ''n'' = 100, ω = 0.01, ..., 1000]]
| |
| | |
| In [[probability theory]] and [[statistics]], '''Fisher's noncentral hypergeometric distribution''' is a generalization of the [[hypergeometric distribution]] where sampling probabilities are modified by weight factors. Fisher's noncentral hypergeometric distribution can also be defined as the [[Conditional probability distribution|conditional distribution]] of two or more [[Binomial distribution|binomially distributed]] variables dependent upon their fixed sum.
| |
| | |
| The distribution may be illustrated by the following [[urn problem|urn model]]. Assume, for example, that an urn contains ''m''<sub>1</sub> red balls and ''m''<sub>2</sub> white balls, totalling ''N'' = ''m''<sub>1</sub> + ''m''<sub>2</sub> balls. Each red ball has the weight ω<sub>1</sub> and each white ball has the weight ω<sub>2</sub>. We will say that the odds ratio is ω = ω<sub>1</sub> / ω<sub>2</sub>. Now we are taking balls randomly in such a way that the probability of taking a particular ball is proportional to its weight, but independent of what happens to the other balls. The number of balls taken of a particular color follows the [[binomial distribution]]. If the total number ''n'' of balls taken is known then the conditional distribution of the number of taken red balls for given ''n'' is Fisher's noncentral hypergeometric distribution. To generate this distribution experimentally, we have to repeat the experiment until it happens to give ''n'' balls.
| |
| | |
| If we want to fix the value of ''n'' prior to the experiment then we have to take the balls one by one until we have ''n'' balls. The balls are therefore no longer independent. This gives a slightly different distribution known as [[Wallenius' noncentral hypergeometric distribution]]. It is far from obvious why these two distributions are different. See the entry for [[noncentral hypergeometric distributions]] for an explanation of the difference between these two distributions and a discussion of which distribution to use in various situations.
| |
| | |
| The two distributions are both equal to the (central) [[hypergeometric distribution]] when the odds ratio is 1.
| |
| | |
| Unfortunately, both distributions are known in the literature as "the" noncentral hypergeometric distribution. It is important to be specific about which distribution is meant when using this name.
| |
| | |
| Fisher's noncentral hypergeometric distribution was first given the name '''extended hypergeometric distribution''' (Harkness, 1965), and some authors still use this name today.
| |
| | |
| == Univariate distribution ==
| |
| {{Probability distribution |
| |
| name =Univariate Fisher's noncentral hypergeometric distribution|
| |
| type =mass|
| |
| pdf_image =|
| |
| cdf_image =|
| |
| parameters =<math>m_1, m_2 \in \mathbb{N}</math><br /><math>N = m_1 + m_2</math><br /><math>n \in [0,N)</math><br /><math>\omega \in \mathbb{R}_+</math>|
| |
| support =<math>x \in [x_\min,x_\max]</math><br /><math>x_\min=\max(0,n-m_2)</math><br /><math>x_\max=\min(n,m_1)</math>|
| |
| pdf =<math>\frac{\binom{m_1}{x} \binom{m_2}{n-x} \omega^x}{P_0}</math><br />where <math>P_0 = \sum_{y=x_\min}^{x_\max} \binom{m_1}{y} \binom{m_2}{n-y} \omega^y</math>|
| |
| cdf =|
| |
| mean =<math>\frac{P_1}{P_0}</math>, where <math>P_k = \sum_{y=x_\min}^{x_\max} \binom{m_1}{y} \binom{m_2}{n-y} \omega^y\, y^k</math>|
| |
| median =|
| |
| mode =<math>\,\, \left\lfloor \frac{-2C}{B - \sqrt{B^2-4AC}} \right\rfloor \,</math> , where <math>A=\omega-1</math>, <math>B = m_1 + n - N -(m_1+n+2)\omega</math>, <math>C = (m_1+1)(n+1)\omega</math>.|
| |
| variance =<math>\frac{P_2}{P_0} - \left( \frac{P_1}{P_0} \right)^2</math>, where ''P''<sub>''k''</sub> is given above.|
| |
| skewness =|
| |
| kurtosis =|
| |
| entropy =|
| |
| mgf =|
| |
| char =
| |
| }}
| |
| | |
| The probability function, mean and variance are given in the table to the right.
| |
| | |
| An alternative expression of the distribution has both the number of balls taken of each color and the number of balls not taken as random variables, whereby the expression for the probability becomes symmetric.
| |
| | |
| The calculation time for the probability function can be high when the sum in ''P''<sub>0</sub> has many terms. The calculation time can be reduced by calculating the terms in the sum recursively relative to the term for ''y'' = ''x'' and ignoring negligible terms in the tails (Liao and Rosen, 2001).
| |
| | |
| The mean can be approximated by:
| |
| :<math>\mu \approx \frac{-2c}{b - \sqrt{b^2-4ac}} \,</math> ,
| |
| where <math>a=\omega-1</math>, <math>b=m_1 + n - N -(m_1+n)\omega</math>, <math>c=m_1 n \omega</math>.
| |
| | |
| The variance can be approximated by:
| |
| :<math>\sigma^2 \approx \frac{N}{N-1} \bigg/ \left( \frac{1}{\mu}+ \frac{1}{m_1-\mu}+ \frac{1}{n-\mu}+ \frac{1}{\mu+m_2-n} \right)</math> .
| |
| | |
| Better approximations to the mean and variance are given by Levin (1984, 1990), McCullagh and Nelder (1989), Liao (1992), and Eisinga and Pelzer (2011). The saddlepoint methods to approximate the mean and the variance suggested Eisinga and Pelzer (2011) offer extremely accurate results.
| |
| | |
| === Properties ===
| |
| | |
| The following symmetry relations apply:
| |
| | |
| :<math>\operatorname{fnchypg}(x;n,m_1,N,\omega) = \operatorname{fnchypg}(n-x;n,m_2,N,1/\omega)\,.</math>
| |
| | |
| :<math>\operatorname{fnchypg}(x;n,m_1,N,\omega) = \operatorname{fnchypg}(x;m_1,n,N,\omega)\,.</math>
| |
| | |
| :<math>\operatorname{fnchypg}(x;n,m_1,N,\omega) = \operatorname{fnchypg}(m_1-x;N-n,m_1,N,1/\omega)\,.</math>
| |
| | |
| Recurrence relation:
| |
| | |
| :<math>\operatorname{fnchypg}(x;n,m_1,N,\omega) = \operatorname{fnchypg}(x-1;n,m_1,N,\omega) \frac{(m_1-x+1)(n-x+1)}{x(m_2-n+x)}\omega\,.</math>
| |
| | |
| <br style="clear:both;" />
| |
| | |
| == Multivariate distribution ==
| |
| | |
| {{Probability distribution |
| |
| name =Multivariate Fisher's Noncentral Hypergeometric Distribution|
| |
| type =mass|
| |
| pdf_image =|
| |
| cdf_image =|
| |
| parameters =<math>c \in \mathbb{N}</math><br /><math>\mathbf{m}=(m_1,\ldots,m_c) \in \mathbb{N}^c</math><br /><math>N = \sum_{i=1}^c m_i</math><br /><math>n \in [0,N)</math><br /><math>\boldsymbol{\omega} = (\omega_1,\ldots,\omega_c) \in \mathbb{R}_+^c</math>|
| |
| support =<math>\mathrm{S} = \left\{ \mathbf{x} \in \mathbb{Z}_{0+}^c \, : \, \sum_{i=1}^{c} x_i = n \right\}</math>|
| |
| pdf =<math>\frac{1}{P_0}\prod_{i=1}^{c} \binom{m_i}{x_i}\omega_i^{x_i}</math><br />where <math>P_0 = \sum_{(y_0,\ldots,y_c)\in \mathrm{S}}\prod_{i=1}^{c} \binom{m_i}{y_i}\omega_i^{y_i}</math>|
| |
| cdf =|
| |
| mean =The mean μ<sub>i</sub> of ''x''<sub>i</sub> can be approximated by <br /><math>\mu_i = \frac{m_i r \omega_i}{r \omega_i + 1}</math> where ''r'' is the unique positive solution to <math>\sum_{i=1}^{c}\mu_i = n\,</math>.|
| |
| median =|
| |
| mode =|
| |
| variance =|
| |
| skewness =|
| |
| kurtosis =|
| |
| entropy =|
| |
| mgf =|
| |
| char =
| |
| }}
| |
| | |
| The distribution can be expanded to any number of colors ''c'' of balls in the urn. The multivariate distribution is used when there are more than two colors.
| |
| | |
| The probability function and a simple approximation to the mean are given to the right. Better approximations to the mean and variance are given by McCullagh and Nelder (1989).
| |
| | |
| === Properties ===
| |
| The order of the colors is arbitrary so that any colors can be swapped.
| |
| | |
| The weights can be arbitrarily scaled:
| |
| | |
| :<math>\operatorname{mfnchypg}(\mathbf{x};n,\mathbf{m}, \boldsymbol{\omega}) = \operatorname{mfnchypg}(\mathbf{x};n,\mathbf{m}, r\boldsymbol{\omega})\,\,</math> for all <math>r \in \mathbb{R}_+.</math>
| |
| | |
| Colors with zero number (''m''<sub>''i''</sub> = 0) or zero weight (ω<sub>''i''</sub> = 0) can be omitted from the equations.
| |
| | |
| Colors with the same weight can be joined:
| |
| | |
| :<math>
| |
| \begin{align}
| |
| & {} \operatorname{mfnchypg}\left(\mathbf{x};n,\mathbf{m}, (\omega_1,\ldots,\omega_{c-1},\omega_{c-1})\right) \\
| |
| & {} = \operatorname{mfnchypg}\left((x_1,\ldots,x_{c-1}+x_c); n,(m_1,\ldots,m_{c-1}+m_c), (\omega_1,\ldots,\omega_{c-1})\right)\, \cdot \\
| |
| & \qquad \operatorname{hypg}(x_c; x_{c-1}+x_c, m_c, m_{c-1}+m_c)
| |
| \end{align}
| |
| </math>
| |
| | |
| where <math>\operatorname{hypg}(x;n,m,N)</math> is the (univariate, central) hypergeometric distribution probability.
| |
| | |
| <br style="clear:both;" />
| |
| | |
| == Applications ==
| |
| Fisher's noncentral hypergeometric distribution is useful for models of biased sampling or biased selection where the individual items are sampled independently of each other with no competition. The bias or odds can be estimated from an experimental value of the mean. Use [[Wallenius' noncentral hypergeometric distribution]] instead if items are sampled one by one with competition.
| |
| | |
| Fisher's noncentral hypergeometric distribution is used mostly for tests in [[contingency table]]s where a conditional distribution for fixed margins is desired. This can be useful, for example, for testing or measuring the effect of a medicine. See McCullagh and Nelder (1989).
| |
| | |
| == Software available ==
| |
| *[http://reference.wolfram.com/mathematica/ref/FisherHypergeometricDistribution.html FisherHypergeometricDistribution] in [[Mathematica]].
| |
| * An implementation for the [[R (programming language)|R programming language]] is available as the package named [http://cran.r-project.org/web/packages/BiasedUrn/index.html BiasedUrn]. Includes univariate and multivariate probability mass functions, distribution functions, [[quantile]]s, [[random variable]] generating functions, mean and variance.
| |
| * The [[R (programming language)|R]] package [http://mcmcpack.wustl.edu/ MCMCpack] includes the univariate probability mass function and random variable generating function.
| |
| * [[SAS System]] includes univariate probability mass function and distribution function.
| |
| * Implementation in [[C++]] is available from [http://www.agner.org/random/ www.agner.org].
| |
| * Calculation methods are described by Liao and Rosen (2001) and Fog (2008).
| |
| | |
| == See also ==
| |
| * [[Noncentral hypergeometric distributions]]
| |
| * [[Wallenius' noncentral hypergeometric distribution]]
| |
| * [[Hypergeometric distribution]]
| |
| * [[Urn problem|Urn models]]
| |
| * [[Biased sample]]
| |
| * [[Bias (statistics)|Bias]]
| |
| * [[Contingency table]]
| |
| * [[Fisher's exact test]]
| |
| | |
| == References ==
| |
| | |
| {{Citation
| |
| | last=Breslow
| |
| | first=N. E.
| |
| | last2=Day
| |
| | first2=N. E.
| |
| | year=1980
| |
| | title=Statistical Methods in Cancer Research
| |
| | publisher=International Agency for Research on Cancer
| |
| | place=Lyon
| |
| }}.
| |
| | |
| {{Citation
| |
| | last=Eisinga
| |
| | first=R.
| |
| | last2=Pelzer
| |
| | first2=B.
| |
| | year=2011
| |
| | title=Saddlepoint approximations to the mean and variance of the extended hypergeometric distribution
| |
| | periodical=Statistica Neerlandica
| |
| | volume=65
| |
| | issue=1
| |
| | pages=22–31
| |
| | doi=10.1111/j.1467-9574.2010.00468.x
| |
| }}.
| |
| | |
| {{Citation
| |
| | last=Fog
| |
| | first=A.
| |
| | year=2007
| |
| | title=Random number theory
| |
| | url=http://www.agner.org/random/theory/
| |
| }}.
| |
| | |
| {{Citation
| |
| | last=Fog
| |
| | first=A.
| |
| | year=2008
| |
| | title=Sampling Methods for Wallenius' and Fisher's Noncentral Hypergeometric Distributions
| |
| | periodical=Communications in statictics, Simulation and Computation
| |
| | volume=37
| |
| | issue=2
| |
| | pages=241–257
| |
| | doi=10.1080/03610910701790236
| |
| }}.
| |
| | |
| {{Citation
| |
| | last=Johnson
| |
| | first=N. L.
| |
| | last2=Kemp
| |
| | first2=A. W.
| |
| | last3=Kotz
| |
| | first3=S.
| |
| | author-link=
| |
| | year=2005
| |
| | title=Univariate Discrete Distributions
| |
| | publisher=Wiley and Sons
| |
| | place=Hoboken, New Jersey
| |
| }}.
| |
| | |
| {{Citation
| |
| | last=Levin
| |
| | first=B.
| |
| | year=1984
| |
| | title=Simple Improvements on Cornfield's approximation to the mean of a noncentral Hypergeometric random variable
| |
| | periodical=Biometrika
| |
| | volume=71
| |
| | issue=3
| |
| | pages=630–632
| |
| | doi=10.1093/biomet/71.3.630
| |
| }}.
| |
| | |
| {{Citation
| |
| | last=Levin
| |
| | first=B.
| |
| | year=1990
| |
| | title=The saddlepoint correction in conditional logistic likelihood analysis
| |
| | periodical=Biometrika
| |
| | volume=77
| |
| | issue=2
| |
| | pages=275–285
| |
| | jstor=2336805
| |
| }}.
| |
| | |
| {{Citation
| |
| | last=Liao
| |
| | first=J.
| |
| | year=1992
| |
| | title=An Algorithm for the Mean and Variance of the Noncentral Hypergeometric Distribution
| |
| | periodical=Biometrics
| |
| | volume=48
| |
| | issue=3
| |
| | pages=889–892
| |
| | doi=10.2307/2532354
| |
| | jstor=2532354
| |
| }}.
| |
| | |
| {{Citation
| |
| | last=Liao
| |
| | first=J. G.
| |
| | last2=Rosen
| |
| | first2=O.
| |
| | year=2001
| |
| | title=Fast and Stable Algorithms for Computing and Sampling from the Noncentral Hypergeometric Distribution
| |
| | periodical=The American Statistician
| |
| | volume=55
| |
| | issue=4
| |
| | pages=366–369
| |
| | doi=10.1198/000313001753272547
| |
| }}.
| |
| | |
| {{Citation
| |
| | last=McCullagh
| |
| | first=P.
| |
| | last2=Nelder
| |
| | first2=J. A.
| |
| | year=1989
| |
| | title=Generalized Linear Models, 2. ed.
| |
| | publisher=Chapman and Hall
| |
| | place=London
| |
| }}.
| |
| {{ProbDistributions|discrete-finite}}
| |
| | |
| {{DEFAULTSORT:Fisher's Noncentral Hypergeometric Distribution}}
| |
| [[Category:Discrete distributions]]
| |
| [[Category:Probability distributions]]
| |