FisherHypergeometricDistribution
✖
FisherHypergeometricDistribution
represents a Fisher noncentral hypergeometric distribution.
Details

- A Fisher hypergeometric distribution gives the distribution of the number of successes in n independent draws from a population of size ntot containing nsucc successes with the odds ratio w.
- FisherHypergeometricDistribution allows n, nsucc, and ntot to be any integers such that 0<n≤ntot, and 0≤nsucc≤ntot, and w is any positive real number.
- FisherHypergeometricDistribution can be used with such functions as Mean, CDF, and RandomVariate.
Background & Context
- FisherHypergeometricDistribution[n,nsucc,ntot,w] represents a discrete statistical distribution defined for integer values
contained in
and determined by four parameters n, nsucc, ntot, and w. In particular, w is a real number representing the odds ratio of the experiment described by the Fisher hypergeometric distribution, while n, nsucc, and ntot are integers satisfying 0<n≤ntot and 0≤nsucc≤ntot and indicating the number of draws of the experiment, the number of successes within that population, and the size of the population drawn from, respectively. The Fisher hypergeometric distribution has a probability density function (PDF) that is discrete, unimodal, and sometimes referred to as Fisher's noncentral hypergeometric distribution in order to differentiate it from the (central) hypergeometric distribution (HypergeometricDistribution).
- Fisher's hypergeometric distribution can be illustrated using a particularly defined urn model containing nsucc blue balls and ntot-nsucc green balls having weights w1 and w2, respectively. From this urn, n balls are known to be drawn at random and so that the probability of taking a particular ball is proportional to its weight but is independent from what happens to the other balls. Under this construction, the conditional distribution modeling the number of taken blue balls given n is modeled by Fisher's hypergeometric distribution with
. Note that this model is almost identical to the urn model defining WalleniusHypergeometricDistribution, with the exception that the latter is modeled by a drawing procedure that fails to be independent, and that the drawing procedure described above is such that each draw is distributed according to BinomialDistribution.
- A number of real-world phenomena can be modeled using a Fisher hypergeometric distribution. For example, the distribution has been shown to model the deaths of species competing for a limited food resource (assuming the fates of the species members are independent of one another). Fisher's hypergeometric distribution is also important to the theory of Monte Carlo simulations and can be used to perform statistical tests on contingency tables.
- RandomVariate can be used to give one or more machine- or arbitrary-precision (the latter via the WorkingPrecision option) pseudorandom variates from a Fisher hypergeometric distribution. Distributed[x,FisherHypergeometricDistribution[n,nsucc,ntot,w]], written more concisely as xFisherHypergeometricDistribution[n,nsucc,ntot,w], can be used to assert that a random variable x is distributed according to a Fisher hypergeometric distribution. Such an assertion can then be used in functions such as Probability, NProbability, Expectation, and NExpectation.
- The probability density and cumulative distribution functions may be given using PDF[FisherHypergeometricDistribution[n,nsucc,ntot,w],x] and CDF[FisherHypergeometricDistribution[n,nsucc,ntot,w],x]. The mean, median, variance, raw moments, and central moments may be computed using Mean, Median, Variance, Moment, and CentralMoment, respectively. These quantities can be visualized using DiscretePlot.
- DistributionFitTest can be used to test if a given dataset is consistent with a Fisher hypergeometric distribution, EstimatedDistribution to estimate a Fisher hypergeometric parametric distribution from given data, and FindDistributionParameters to fit data to a Fisher hypergeometric distribution. ProbabilityPlot can be used to generate a plot of the CDF of given data against the CDF of a symbolic Fisher hypergeometric distribution and QuantilePlot to generate a plot of the quantiles of given data against the quantiles of a symbolic Fisher hypergeometric distribution.
- TransformedDistribution can be used to represent a transformed Fisher hypergeometric distribution, CensoredDistribution to represent the distribution of values censored between upper and lower values, and TruncatedDistribution to represent the distribution of values truncated between upper and lower values. CopulaDistribution can be used to build higher-dimensional distributions that contain a Fisher hypergeometric distribution, and ProductDistribution can be used to compute a joint distribution with independent component distributions involving Fisher hypergeometric distributions.
- FisherHypergeometricDistribution is related to a number of other statistical distributions. As mentioned above, there is a fundamental link between FisherHypergeometricDistribution, WalleniusHypergeometricDistribution, and HypergeometricDistribution. The latter relationship can be made quantitatively precise by noting that FisherHypergeometricDistribution[n,nsucc,ntot,1] has the same PDF as HypergeometricDistribution[n,nsucc,ntot]. In addition, FisherHypergeometricDistribution can be obtained from two independent samples distributed according to BinomialDistribution by conditioning on their total.
Examples
open allclose allBasic Examples (3)Summary of the most common use cases

https://wolfram.com/xid/01lgynmsxg1t8rh46-gajfag


https://wolfram.com/xid/01lgynmsxg1t8rh46-z1tsez


https://wolfram.com/xid/01lgynmsxg1t8rh46-185xgp

Cumulative distribution function:

https://wolfram.com/xid/01lgynmsxg1t8rh46-j3pm1y


https://wolfram.com/xid/01lgynmsxg1t8rh46-byyz6l


https://wolfram.com/xid/01lgynmsxg1t8rh46-o0ofzy


https://wolfram.com/xid/01lgynmsxg1t8rh46-ynu7n

Scope (5)Survey of the scope of standard use cases
Generate a sample of pseudorandom numbers from a noncentral hypergeometric distribution:

https://wolfram.com/xid/01lgynmsxg1t8rh46-qhtk5j
Compare its histogram to the PDF:

https://wolfram.com/xid/01lgynmsxg1t8rh46-03mwaz

Distribution parameters estimation:

https://wolfram.com/xid/01lgynmsxg1t8rh46-45b7g2
Estimate the distribution parameters from sample data:

https://wolfram.com/xid/01lgynmsxg1t8rh46-epi747

Compare the density histogram of the sample with the PDF of the estimated distribution:

https://wolfram.com/xid/01lgynmsxg1t8rh46-f8ui5o

Different moments with closed forms as functions of parameters:

https://wolfram.com/xid/01lgynmsxg1t8rh46-zppkee


https://wolfram.com/xid/01lgynmsxg1t8rh46-o6i3hc


https://wolfram.com/xid/01lgynmsxg1t8rh46-zg9ct4

Closed form for symbolic order:

https://wolfram.com/xid/01lgynmsxg1t8rh46-fqv8sj


https://wolfram.com/xid/01lgynmsxg1t8rh46-9gzmth


https://wolfram.com/xid/01lgynmsxg1t8rh46-7tmr9u


https://wolfram.com/xid/01lgynmsxg1t8rh46-beq3rh


https://wolfram.com/xid/01lgynmsxg1t8rh46-f5db4g

https://wolfram.com/xid/01lgynmsxg1t8rh46-bzwvpb

Applications (2)Sample problems that can be solved with this function
CDF of FisherHypergeometricDistribution is an example of a right-continuous function:

https://wolfram.com/xid/01lgynmsxg1t8rh46-5w2lx5


https://wolfram.com/xid/01lgynmsxg1t8rh46-q2wu5i

An urn contains red balls of weight
and
blue balls of weight
. With
balls drawn independently, the probability of drawing a red or blue ball depends on its weight. If
,
,
,
, and
, find the distribution of the number of red balls drawn:

https://wolfram.com/xid/01lgynmsxg1t8rh46-6amncv

https://wolfram.com/xid/01lgynmsxg1t8rh46-51lq04

Find the probability that at least 3 red balls were drawn:

https://wolfram.com/xid/01lgynmsxg1t8rh46-tb1kgi


https://wolfram.com/xid/01lgynmsxg1t8rh46-rhadkn

Find the average number of red balls:

https://wolfram.com/xid/01lgynmsxg1t8rh46-wkon6e


https://wolfram.com/xid/01lgynmsxg1t8rh46-69m8p4

Simulate the number of red balls in 30 consecutive samples of 12:

https://wolfram.com/xid/01lgynmsxg1t8rh46-zo9gvm

Properties & Relations (3)Properties of the function, and connections to other functions
Relationships to other distributions:

HypergeometricDistribution is a special case:

https://wolfram.com/xid/01lgynmsxg1t8rh46-clsjas


https://wolfram.com/xid/01lgynmsxg1t8rh46-6vd55v


https://wolfram.com/xid/01lgynmsxg1t8rh46-kwvdea

FisherHypergeometricDistribution can be obtained from two independent binomial variates conditioning on their total:

https://wolfram.com/xid/01lgynmsxg1t8rh46-lgkx5


https://wolfram.com/xid/01lgynmsxg1t8rh46-b74str


https://wolfram.com/xid/01lgynmsxg1t8rh46-r2i8vv

Wolfram Research (2010), FisherHypergeometricDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/FisherHypergeometricDistribution.html.
Text
Wolfram Research (2010), FisherHypergeometricDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/FisherHypergeometricDistribution.html.
Wolfram Research (2010), FisherHypergeometricDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/FisherHypergeometricDistribution.html.
CMS
Wolfram Language. 2010. "FisherHypergeometricDistribution." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FisherHypergeometricDistribution.html.
Wolfram Language. 2010. "FisherHypergeometricDistribution." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FisherHypergeometricDistribution.html.
APA
Wolfram Language. (2010). FisherHypergeometricDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FisherHypergeometricDistribution.html
Wolfram Language. (2010). FisherHypergeometricDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FisherHypergeometricDistribution.html
BibTeX
@misc{reference.wolfram_2025_fisherhypergeometricdistribution, author="Wolfram Research", title="{FisherHypergeometricDistribution}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/FisherHypergeometricDistribution.html}", note=[Accessed: 07-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_fisherhypergeometricdistribution, organization={Wolfram Research}, title={FisherHypergeometricDistribution}, year={2010}, url={https://reference.wolfram.com/language/ref/FisherHypergeometricDistribution.html}, note=[Accessed: 07-June-2025
]}