Gives the probability of drawing exactly a given number of successes when items are taken without replacement. Unlike the binomial distribution, it accounts for the pool changing with every draw.
A box holds 50 tickets, 10 of them winners. Draw 5 without putting any back: what is the chance that exactly 2 are winners? Drawing without replacement makes this a hypergeometric problem.
The formula reads directly. The denominator counts every way to choose items from . The numerator counts the ways to choose items from the successes and the remaining from the failures. Treating every selection as equally likely, the probability is the share that qualifies.
The mean and variance follow.
Take the defaults , , and .
The denominator is 2118760. The numerator is , which is , or 444600. Dividing gives about 0.2098 for exactly two winners.
The chance of two or fewer adds the cases of zero, one and two, coming to about 0.9517. The expected number of winners is , exactly 1, with a standard deviation of about 0.8571.
Putting each ticket back would keep the chance of a winner at 0.2 every time, making it a binomial problem. That gives , about 0.2048. Close to 0.2098, but not the same.
The variance shows the difference more sharply. The binomial variance is , or 0.8, whereas the hypergeometric multiplies that by , here , giving 0.7347. That multiplier is the finite population correction.
Drawing without replacement makes each draw nudge the remaining pool against whatever just happened. Take a winner and fewer winners remain, so the next draw is less likely to win; take a loser and the reverse. That self-correction is what narrows the spread of the result. When is small relative to the correction approaches 1 and the binomial becomes a perfectly good approximation.
The population is capped at 1000 so the combination counts stay within exact arithmetic.
The number of successes drawn cannot exceed the number drawn. Asking for more successes than exist in the population, or for a draw that would need more failures than exist, returns a probability of 0.