🎴Hypergeometric Distribution Calculator

Exact, at-most and at-least probabilities for sampling without replacement

How to use the hypergeometric distribution calculator

The hypergeometric distribution describes drawing without replacement, where whatever comes out stays out. It answers questions like the chance of exactly two aces in five cards from a 52-card deck, or the chance of at least one defect when ten items are inspected from a box of a hundred that holds five defects. The pool shrinks with every draw, and that is precisely what separates it from the binomial distribution.

Enter the population size, how many successes it contains, how many items you draw and how many successes you care about. The calculator returns the exact probability along with the at-most and at-least probabilities, and tabulates the probability for every possible number of successes. The expected value is the draw count times the success share, while the variance carries a finite population correction that comes from not replacing anything. Two aces in five cards from a full deck works out at roughly 3.99%.

The number of successes has hard limits. It cannot exceed the smaller of the draws and the available successes, and the failures it implies cannot outnumber the failures in the population. Outside that window the setup is not merely improbable but impossible, so the calculator says so. Binomial coefficients are built by exact sequential multiplication, and anything past the safe integer limit switches to log gamma to avoid overflow.

Frequently asked questions

How does this differ from the binomial distribution?

The binomial puts each item back so every draw has the same probability. The hypergeometric keeps it out, so the remaining share of successes shifts with every draw.

Why do large success counts trigger a message?

The count cannot exceed the smaller of the draws and the available successes, and the implied failures must fit inside the population. The valid range is shown with the results.

Are large numbers still accurate?

Coefficients are built by sequential multiplication, which is exact inside the safe integer range, and past that the log gamma route keeps the value from collapsing.