calculator.onl
Categories50

Hypergeometric probability calculator

Calculate exact-count and cumulative probabilities for sampling a finite population without replacement.

A worked example

Draw two balls without replacement. Compare the chance of getting no gold balls with the chance of getting exactly one.

Exactly k29.95%At least k34.12%At most k95.83%Expected successes0.3846
Count every item present before the first draw. For a standard pack of playing cards, enter 52.

Count all items in the starting population with the property you want to track. For aces in a standard deck, enter 4.

Enter the number of items taken in a single sample. A five-card hand uses 5, with each drawn card kept out of the deck.

Enter the success count to test. Entering 1 shows the probabilities of exactly one, one or more, and one or fewer successes.

Updates as you type

Use a dot or comma for decimals. No thousands separators.

YOUR RESULT

Exactly k

29.95%

Calculated from your inputs

At least k34.12%
At most k95.83%
Expected successes0.3846
Variance0.3272
Smallest possible k0
Largest possible k4
The numbers, at a glance

Calculations run in your browser.
UNDERSTAND THE RESULT

A little context. A clearer answer.

↑ Back to calculator

When this calculator is useful

Taking more draws from the same finite population changes the chance of getting exactly the specified number of successes. Change “Draws without replacement n” from 5 to 10 and keep the other inputs from the worked example. The value for “Exactly k” goes from 29.9474% to 42.4047%. For a related calculation, try Binomial probability calculator.

What to enter

InputWhat it meansExample value
Population size NCount every item present before the first draw. For a standard pack of playing cards, enter 52.52
Successes in population KCount all items in the starting population with the property you want to track. For aces in a standard deck, enter 4.4
Draws without replacement nEnter the number of items taken in a single sample. A five-card hand uses 5, with each drawn card kept out of the deck.5
Observed successes kEnter the success count to test. Entering 1 shows the probabilities of exactly one, one or more, and one or fewer successes.1

How the calculation works

  1. Change the inputs to explore your own scenario. Population size N; Successes in population K; Draws without replacement n; Observed successes k.
  2. P(X=k)=C(K,k)×C(N−K,n−k)/C(N,n); E[X]=nK/N
  3. Assumes each sample of the specified size is equally likely and exactly two population classes exist. Recurrence is normalised over the entire feasible support. Extremely small tails can underflow to zero; use specialist arbitrary-precision software when such tails matter.
The formulaP(X=k)=C(K,k)×C(N−K,n−k)/C(N,n); E[X]=nK/N

A worked example

N=52; K=4; n=5; k=1 → P(X=1)=29.94736356%; P(X≥1)=34.11580017%.

Example you can load

What to enter
Result for this example · Exactly k29.95%

This is a fixed example; changing the form above does not change these numbers.

Assumptions & limits

Assumes each sample of the specified size is equally likely and exactly two population classes exist. Recurrence is normalised over the entire feasible support. Extremely small tails can underflow to zero; use specialist arbitrary-precision software when such tails matter.

Reference ·

Frequently asked questions

What is the difference between exactly one ace and at least one ace?

In a five-card hand from a standard deck, exactly one ace has a probability of about 29.95%. At least one also counts hands with two, three or four aces, raising the probability to about 34.12%.

What if the sample is too large to contain zero successes?

Suppose a jar contains 7 marked and 3 unmarked tokens. Drawing 5 without replacement guarantees at least 2 marked tokens because only 3 unmarked ones exist. The minimum possible count shown is 2.

Can I use this for repeated draws if I return each item?

Returning the item restores the original population before the next draw. For independent draws with replacement and a constant success probability, use a binomial model. Here, each draw removes one item.