Skip to content

Hypergeometric Calculator

Find the chance of an exact hypergeometric draw. A population of 10 with 4 marked items, drawing 5, has a 120/252 chance of exactly 2 marked items. The page shows that probability as a decimal.

Result

Enter the population and the draw

How to Use

  1. 1 Enter the population, the marked count, the draw size, and the marked successes.
  2. 2 The draw cannot be larger than the population.
  3. 3 Read the exact fraction and the decimal.

Example Output

  • N 10, K 4, n 5, k 2 is 120/252.

About This Tool

The probability is C(K, k) × C(N − K, n − k) / C(N, n). N is the population, K is the marked count, n is the draw, and k is the marked count in the draw.

Using the Hypergeometric Calculator

The Hypergeometric Calculator finds the chance of an exact count of marked items in a draw without replacement. Population N begins at 10. Marked items K begin at 4. Draw size n begins at 5. Marked in the draw k begins at 2. Choose Find the probability. The label above the headline reads Probability. The headline is 0.47619047619. The sentence says: The probability is 120/252, which is 0.47619047619. The Numerator line is 120. The Denominator line is 252. The Probability line is 0.47619047619, matching the headline.

The probability is C(K, k) times C(N − K, n − k), divided by C(N, n). For the sample, C(4, 2) is 6 and C(6, 3) is 20, and 6 times 20 is 120. C(10, 5) is 252. The page divides 120 by 252 and shows 0.47619047619. The steps under the result say to count the ways to draw the marked items and the other items, divide by the ways to draw from the population, and read the decimal 0.47619047619. The headline is that decimal, not the numerator 120 and not the denominator 252.

Marked items and the draw must be at most the population. Marked items of 11 with population 10, or a draw of 11 with population 10, is rejected with Marked items and the draw must be at most the population. A marked count that cannot occur in the draw is rejected with That marked count cannot occur in the draw. For the sample population and draw, k of 5 fails that second message because 5 is larger than the 4 marked items. Each field must be a whole number inside its bound before those checks run.

Copy result copies the sentence, which names 120/252 and 0.47619047619. Reset returns the fields to 10, 4, 5, and 2 and the headline to Enter the population and the draw. Copy the sentence before you reset. The same four numbers always rebuild the same fraction. Find the probability on 10, 4, 5, and 2 twice and the headline stays 0.47619047619. The page does not simulate a shuffle, look up a table of probabilities, or return a range. The four fields are the whole input.

What the Headline 0.47619047619 Measures

The headline is the probability of exactly k marked items when you draw n items from a population of N that contains K marked items. For 10, 4, 5, and 2, that probability is 0.47619047619. The fraction behind it is 120/252. The Numerator line keeps 120. The Denominator line keeps 252. The sentence puts the fraction and the decimal in one line.

The page does not return the population. You typed N. It does not return the draw size as the headline. It returns the probability. 0.47619047619 is that result because 120 divided by 252 is 0.47619047619. If the headline were 120, it would be the count of favorable draws, which is a line and not the probability. If the headline were 252, it would be the count of possible draws of 5 from 10. The steps mention both counts. The headline stays 0.47619047619.

How 10, 4, 5, and 2 Become 120/252

The page reads population, marked items, draw size, and marked in the draw as whole numbers. Population must be a whole number from 1 to 60. Marked items, draw size, and marked in the draw must each be a whole number from 0 to 60. It then requires marked items and the draw to be at most the population. It also requires the marked count to be possible: k cannot exceed K, k cannot exceed n, and the unmarked items in the draw cannot exceed the unmarked items in the population. For 10, 4, 5, and 2 those checks pass. The numerator is 120 and the denominator is 252. The headline is 0.47619047619.

A comparison that does not pick a base is a different percent. The Percentage Difference Calculator uses the absolute difference divided by the average of the absolute values, times 100. The absolute difference of 40 and 50 is 10. The average of the absolute values is 45. The percentage difference is 22.22. Use that page when you are comparing two numbers. Use this page when N is 10, K is 4, n is 5, and k is 2, and the sentence should say 120/252, which is 0.47619047619. A percentage difference of 22.22 is not a draw probability.

What the Four Fields Do Not Assume

The page does not know whether the marked items are cards, parts, or names. It does not add a unit. The sentence names the fraction and the decimal. If you need a unit, write it beside the copied sentence. The page also does not compute a second k in the same run. A second exact count is a new entry in the marked-in-the-draw field.

From N 10, K 4, n 5, and k 2 to 0.47619047619

Leave the population at 10, the marked items at 4, the draw at 5, and the marked count at 2. Choose Find the probability. The headline is 0.47619047619. The numerator line is 120. The denominator line is 252. The sentence says the probability is 120/252, which is 0.47619047619. Calculate again. The figures match. The label still reads Probability.

A percent drop from a start to a smaller end is a different page. The Percentage Decrease Calculator finds that drop. A start of 50 and an end of 40 is a drop of 10, which is 20 percent. The end must not be above the start. Use that page when you have a start and a smaller end. Use this page when the question is an exact hypergeometric count and the sample should read 0.47619047619. A drop of 20 percent is not 120/252.

Draws People Count the Wrong Way

A common miss is to read 120 as the probability. One hundred twenty is the numerator. The headline is 0.47619047619. Another miss is to divide 252 by 120 and expect the page to show a number larger than 1. The page divides the numerator by the denominator. Another miss is to treat the draw as if items were replaced. The combination C(10, 5) is 252 because the five positions are a subset, not an ordered list with replacement.

A profit margin is a different ratio. The Profit Margin Calculator finds profit and margin from revenue and cost. Revenue of 200 and cost of 150 give profit of 50 and a margin of 25 percent. The margin is profit divided by revenue. Use that page when the inputs are revenue and cost. Use this page when the inputs are a population, a marked count, a draw, and an exact success count. A margin of 25 percent is not the probability 0.47619047619.

Keeping N, K, n, k, and the Fraction

Copy the sentence. It already holds 120/252 and 0.47619047619. Write N, K, n, and k beside it, because the sentence does not repeat those four fields. For the sample, that is population 10, marked items 4, draw 5, marked in the draw 2, fraction 120/252, and decimal 0.47619047619. A note that says only 0.47619047619 can be misread later as a different k on the same population. The fraction plus the four fields prevents that. Copy the sentence before you reset. Reset returns the fields to 10, 4, 5, and 2 and the headline to Enter the population and the draw.

A sale price after a percent off is a different record. The Discount Calculator multiplies a price by a percent and divides by 100. A price of 80 at 25 percent is a discount of 20 and a sale price of 60. The page does not look up a store. Use it when the inputs are a price and a discount percent. Use this page when the inputs are N, K, n, and k. A sale price of 60 is not a hypergeometric probability.

A Probability for the Draw You Typed

The headline answers the probability of the exact marked count you typed. From N 10, K 4, n 5, and k 2 the answer is 0.47619047619, and the fraction is 120/252. From k 1 the answer is 0.238095238095, and the fraction is 60/252. From k 0 the answer is 0.02380952381, and the fraction is 6/252. Those figures come from the combinations of the four fields. They do not come from a simulation.

Checking the Combinations

Count the ways to choose k marked items from K, and the ways to choose the remaining draw from the unmarked items. Multiply those two counts and divide by the ways to choose the draw from the population. For 4, 2, 6, and 3, the checks are 6, 20, and 120. The denominator for choosing 5 from 10 is 252. The headline should be 0.47619047619. If the headline matches 120, you are looking at the numerator line. The label above the headline reads Probability on a successful run. An error headline means the probability was not calculated.

Return on a gain and a cost is a different ratio. The ROI Calculator subtracts the cost from the gain, divides by the cost, and multiplies by 100. A gain of 150 and a cost of 100 is an ROI of 50 percent. Use it when the inputs are a gain and a cost. Use this page when the inputs are a population and a draw and the sample should read 0.47619047619. An ROI of 50 percent is not 120/252.

Frequently Asked Questions

What do N 10, K 4, n 5, and k 2 return?

The headline is 0.47619047619. The sentence says the probability is 120/252, which is 0.47619047619. The numerator line is 120. The denominator line is 252. The probability line matches the headline.

What is the formula?

The probability is C(K, k) times C(N − K, n − k), divided by C(N, n). For 4, 2, 6, and 3 that product is 6 times 20, which is 120. C(10, 5) is 252. The decimal is 0.47619047619.

Why is the fraction 120/252?

There are 6 ways to choose 2 marked items from 4 and 20 ways to choose 3 unmarked items from 6. The product is 120. There are 252 ways to choose 5 items from 10. The page shows both the fraction and the decimal 0.47619047619.

What if marked items or the draw exceed the population?

The headline reads Marked items and the draw must be at most the population. Marked items of 11 with population 10 fails that way. A draw of 11 with population 10 fails that way. The lines are cleared. Restore values that fit inside the population.

What if that marked count cannot occur?

The headline reads That marked count cannot occur in the draw. Asking for 5 marked items when only 4 exist fails that way. A draw of 8 with only 1 marked success also fails, because the other 7 items would have to come from 6 unmarked items. The sample k of 2 is allowed.

Are decimals allowed?

No. Each field must be a whole number. Population 10.5 is rejected with Population must be a whole number from 1 to 60. Population must be from 1 to 60. Marked items, draw size, and marked in the draw must be whole numbers from 0 to 60. A word uses the whole-number message for that label.

What do the other k values return on this draw?

On population 10, marked items 4, and draw 5, k of 1 is 60/252, which is 0.238095238095. k of 3 is the same fraction and decimal. k of 0 is 6/252, which is 0.02380952381. k of 4 is the same 6/252. k of 2 remains 120/252, which is 0.47619047619.

What does reset restore?

Population returns to 10. Marked items return to 4. Draw size returns to 5. Marked in the draw returns to 2. The headline returns to Enter the population and the draw. Choose Find the probability again when you want 120/252 and the headline 0.47619047619.