This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

HypergeometricDistribution

HypergeometricDistribution
represents a hypergeometric distribution.
  • A hypergeometric distribution gives the distribution of the number of successes in n draws from a population of size containing successes.
Probability density function:
Cumulative distribution function:
Mean and variance:
Probability density function:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=
 
Cumulative distribution function:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
 
Mean and variance:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Generate a set of pseudorandom numbers that are hypergeometrically distributed:
Compare its histogram to the PDF:
Distribution parameters estimation:
Estimate the distribution parameters from sample data:
Compare the density histogram of the sample with the PDF of the estimated distribution:
Skewness:
Kurtosis:
Different moments with closed forms as functions of parameters:
Closed form for symbolic order:
Hazard function:
Quantile function:
CDF of HypergeometricDistribution is an example of a right continuous function:
Suppose an urn has 100 elements, of which 40 are special:
The probability distribution that there are 20 special elements in a draw of 50 elements:
Compute the probability that there are more than 25 special elements in a draw of 50 elements:
Compute the expected number of special elements in a draw of 50 elements:
Suppose there are 5 defective items in a batch of 10 items, and 6 items are selected for testing. Simulate the process of testing when the number of defective items found is counted:
Find the probability that there are 2 defective items in the sample:
Find the distribution of the number of spades in a five-card poker hand:
Find the probability that there are at least 2 spades in the poker hand:
A lottery sells 10 tickets for $1 per ticket. Each time there is only one winning ticket. A gambler has $5 to spend. Find his probability of winning if he buys 5 tickets in 5 different lotteries:
His probability of winning is greater if he buys 5 tickets in the same lottery:
An urn contains white balls and 1 blue ball. Two players draw balls from the urn without replacement until the blue ball is drawn. The player who draws the blue ball wins. Find the chance of winning for the player who draws the first ball. Assuming the first player wins at the draw, the probability that the previous draws were all white follows HypergeometricDistribution:
The conditional probability of drawing a blue ball given that the previous balls were white:
The resulting probability is a sum over :
When the number of white balls is odd, both players have an equal chance of winning:
When the number of white balls is even, the game is unfair:
The probability of getting an irrational number or negative number is zero:
The characteristic function of the hypergeometric distribution is defined in terms of Hypergeometric2F1Regularized:
Relationships to other distributions:
The infinite population limit of HypergeometricDistribution is BinomialDistribution:
Hypergeometric distribution is a special case of FisherHypergeometricDistribution:
Hypergeometric distribution is a special case of WalleniusHypergeometricDistribution:
Hypergeometric distribution is equivalent to a bivariate MultivariateHypergeometricDistribution:
HypergeometricDistribution can be obtained from two independent binomial variates conditioning of their total:
HypergeometricDistribution is not defined when , , or n is non-positive:
HypergeometricDistribution is not defined when :
HypergeometricDistribution is not defined when :
Substitution of invalid parameters into symbolic outputs gives results that are not meaningful:
New in 6