Calculators King

Probability

Hypergeometric Distribution Calculator

Compute the probability of k observed successes when drawing without replacement from a finite population that holds K successes.

Worksheet

Press Calculate to see the result.

Compute the probability of k observed successes when drawing without replacement from a finite population that holds K successes.

What this calculator answers

When you draw a handful of items from a finite shelf and you do not put them back, the probability of the next success changes after every pick. Cards from a deck, defective parts from a short lot, and tagged animals from a pond are the usual pictures. This page takes the population size, the number of success states, the size of the draw, and the observed count, then returns the hypergeometric probability and the mean of that draw.

The point probability is computed by the hypergeometric mass routine, which is the ratio of combinations C(K, k) × C(N − K, n − k) / C(N, n). The mean of the draw is n × K / N. The variance includes the finite-population factor (N − n) / (N − 1). Supporting counts and intermediate terms sit under the headline so a reader can see what was divided by what. When a checkbox or a tail setting changes the divisor or the rejection region, that choice appears in the steps rather than vanishing into a silent default.

The formula, written out

Hypergeometric probability of a draw without replacement uses this relationship.

P(X = k) = C(K, k) × C(N − K, n − k) / C(N, n), mean = n × K / N

  • N. The population size.
  • K. How many population items are successes.
  • n. How many items are drawn.
  • k. How many of the drawn items are successes.

Every subset of size n is equally likely. The favorable subsets pair k successes chosen from K with n − k failures chosen from N − K. Dividing those combinations by the number of ways to choose the whole draw gives the mass. The mean follows because each drawn slot has success probability K/N, and n slots add. The algebra is the named textbook identity for this worksheet. Intermediate products and quotients appear in order so a calculator and a pencil can agree to the displayed rounding. If a neighbouring page uses a different divisor or a continuity correction, that page says so on its own ticket.

A full worked example

Example loaded in the worksheet

The form is prefilled with a small example so every arithmetic step can be checked by hand. Change one field after you finish the walkthrough and confirm the ticket moves the way the formula predicts.

The population has 30 items, of which 10 are successes. The draw takes 8 items and asks for the probability of exactly 3 successes. The mass is C(10, 3) × C(20, 5) / C(30, 8), which equals 0.3179.

The mean is n × K / N = 8 × 10 / 30 = 2.6667. The variance is 1.3487, including the factor (N − n) / (N − 1) = 22 / 29 when N is greater than 1. A binomial model with the same p = 0.3333 would skip that finite-population factor because it replaces each item.

This draw does not replace items, so the hypergeometric probability is the one on the ticket. The observed count 3 fits inside both the draw of 8 and the 10 available successes.

Figures from the worked example
P(X = k)0.3179
Mean nK/N2.6667
Variance1.3487
Population proportion K/N0.3333

A second situation

A draw with no observed successes

The population has 30 items, of which 10 are successes. The draw takes 8 items and asks for the probability of exactly 0 successes. The mass is C(10, 0) × C(20, 8) / C(30, 8), which equals 0.0215.

The mean is n × K / N = 8 × 10 / 30 = 2.6667. The variance is 1.3487, including the factor (N − n) / (N − 1) = 22 / 29 when N is greater than 1. A binomial model with the same p = 0.3333 would skip that finite-population factor because it replaces each item.

This draw does not replace items, so the hypergeometric probability is the one on the ticket. The observed count 0 fits inside both the draw of 8 and the 10 available successes.

Figures from the worked example
P(X = k)0.0215
Mean nK/N2.6667
Variance1.3487
Population proportion K/N0.3333

Moving the observed count from 3 to 0, or the other way, changes only k. The population and the draw stay fixed, so the mean nK/N does not move. The point probability does, because a different number of success states is being requested from the same draw. The second example changes the feature that this formula is sensitive to, and the ticket shows the new figure beside the same definition. That contrast is the fastest way to see which input owns the movement.

What moves when the input moves

The observed success count moved from 3 to 5 in the same draw. The headline result went from 0.3179 to 0.0491.

The nudged inputs

The population has 30 items, of which 10 are successes. The draw takes 8 items and asks for the probability of exactly 5 successes. The mass is C(10, 5) × C(20, 3) / C(30, 8), which equals 0.0491.

The mean is n × K / N = 8 × 10 / 30 = 2.6667. The variance is 1.3487, including the factor (N − n) / (N − 1) = 22 / 29 when N is greater than 1. A binomial model with the same p = 0.3333 would skip that finite-population factor because it replaces each item.

This draw does not replace items, so the hypergeometric probability is the one on the ticket. The observed count 5 fits inside both the draw of 8 and the 10 available successes.

Figures from the worked example
P(X = k)0.0491
Mean nK/N2.6667
Variance1.3487
Population proportion K/N0.3333

How to read the result

Read the probability as the chance of that exact observed count in one draw, not as a with-replacement binomial probability. Read the mean as the expected number of successes in the draw, which can be a fraction even though every actual draw is a whole number. Say the unit, the sample size or contract terms, and the formula name in the same sentence as the figure. A number without those three pieces invites a later reader to invent a definition that this page never used.

Write the result with its unit, the inputs that produced it, and the name of the formula. Write the result with its unit, the inputs that produced it, and the name of the formula. If the ticket shows a decision sentence, quote the alpha and the tail with it. If the ticket shows a money or dose figure, quote the rate and the schedule that produced it.

Assumptions that have to stay true

  • The draw is without replacement.
  • Every subset of size n is equally likely.
  • The population has a fixed number of success states.
  • k cannot exceed the successes available or the size of the draw.

If an assumption above is false, do not average the discomfort away. Change the worksheet or change the question. A correct arithmetic step on the wrong model is still the wrong answer for the decision you are trying to make.

Mistakes that change the answer

  • Using p = K/N in a binomial formula when the draw is a large fraction of the population.
  • Swapping K and n. K is a property of the population. n is the size of the draw.
  • Asking for more successes than the population contains.
  • Dropping the finite-population factor and quoting np(1 − p) as the variance.

Where a different calculator is the honest choice

Use the binomial calculator when each draw is replaced or the population is so large that depletion does not matter. Use the combination calculator when you want only the count of subsets, not the probability. Use the Poisson calculator for rare events in an open interval rather than a finite shelf. Related links under the essay open pages that keep their own formulas instead of hiding a mode switch inside this ticket.

When the job changes, move to a page built for that job: Binomial Distribution Calculator, Combination Calculator, Poisson Distribution Calculator.

Check yourself

A population of 30 contains 10 successes. In a draw of 8, what is the mean number of successes, and what is P(X = 3)?

The mean is 8 × 10 / 30 = 2.6667. The hypergeometric probability of exactly 3 successes is 0.3179.

Using the result in a sentence

Card hands, audit samples from a finite lot, and capture counts from a closed population are natural hypergeometric questions. Keep the count, the unit, and the assumption list beside any copy of the number that leaves this browser tab.

If the population is huge compared with the draw, this probability and the binomial probability with p = K/N nearly agree. The page does not switch models for you. You have to decide whether replacement is the right story. Pair the headline with the steps before you staff a route, set a grade boundary, or compare two contracts from a single number.

Questions people ask next

01What definition does the Hypergeometric Distribution Calculator commit to?

This page uses Hypergeometric probability of a draw without replacement: P(X = k) = C(K, k) × C(N − K, n − k) / C(N, n), mean = n × K / N. Every subset of size n is equally likely. The favorable subsets pair k successes chosen from K with n − k failures chosen from N − K. Dividing those combinations by the number of ways to choose the whole draw gives the mass. The mean follows because each drawn slot has success probability K/N, and n slots add. If a textbook uses a different divisor, a different continuity correction, or a different rounding rule, the last digits can move, so the definition is printed above the result. The worksheet asks for Population N, Success states K, Draw n, Observed successes k, and it refuses a blank that the formula cannot interpret. Keep that printed definition in the sentence you write next to the figure so a later reader can rebuild the arithmetic without guessing which convention you chose.

02How should the worked example be read out loud?

In the loaded example the p(x = k) is 0.3179. Read the probability as the chance of that exact observed count in one draw, not as a with-replacement binomial probability. Read the mean as the expected number of successes in the draw, which can be a fraction even though every actual draw is a whole number. Say the unit and the count before you say whether the number is large or small. Read the steps in order rather than jumping to the headline, because the intermediate terms are where a swapped percent and proportion usually hide. If the ticket shows both a primary figure and a comparison figure, name which one you are quoting.

03What is the fastest way to get a misleading result?

Using p = K/N in a binomial formula when the draw is a large fraction of the population. If the population is huge compared with the draw, this probability and the binomial probability with p = K/N nearly agree. The page does not switch models for you. You have to decide whether replacement is the right story. A second common failure is leaving a checkbox or tail setting in the wrong state and then treating the number as if the default had matched your plan. Reset the example, change one input, and confirm the ticket moves in the direction the formula predicts before you trust a live run.

04When should I leave this page for a different calculator?

Use the binomial calculator when each draw is replaced or the population is so large that depletion does not matter. Use the combination calculator when you want only the count of subsets, not the probability. Use the Poisson calculator for rare events in an open interval rather than a finite shelf. The related links under the essay go to those worksheets, which keep their own formulas instead of hiding them in a mode switch. If the question changed from a summary to a test, from a payment to a refinance, or from a raw score to a percentile, switch pages rather than forcing this ticket to answer a job it was not built for.

05What belongs in the sentence next to the number?

The mean is 8 × 10 / 30 = 2.6667. The hypergeometric probability of exactly 3 successes is 0.3179. Name the formula, the sample size or the inputs, and the unit before you compare the figure with someone else's. A bare number without those three pieces cannot be audited when a score, a rate, or a lab value is challenged later. Store the inputs beside the result whenever the figure will travel into a report.