The hypergeometric distribution describes the number of successes in a sequence of n draws without replacement from a population of N that contained m total successes.
Its probability mass function is:
Technically the support for the function is only where x∈[max(0, n+m-N), min(m, n)]. In situations where this range is not [0,n], f(x)=0 since for k>0, .
Probability Density Function
We first check to see that f(x) is a valid pmf. This requires that it is non-negative everywhere and that it's total sum is equal to 1. The first condition is obvious. For the second condition we will start with Vandermonde's identity
We now see that if a=m and b=N-m that the condition is satisfied.
We derive the mean as follows:
We use the identity in the denominator.
Next we use the identity in the first binomial of the numerator.
Next, for the variables inside the sum we define corresponding prime variables that are one less. So N′=N−1, m′=m−1, x′=x−1, n′=n-1.
Now we see that the sum is the total sum over a Hypergeometric pmf with modified parameters. This is equal to 1. Therefore
We first determine E(X2).
We use the same variable substitution as when deriving the mean.
The first sum is the expected value of a hypergeometric random variable with parameteres (n',m',N'). The second sum is the total sum that random variable's pmf.
We then solve for the variance