Statistics

Hypergeometric Probability Calculator

Find the chance of exactly k marked items when sampling without replacement.

Data stays on this deviceConvention explained below
Probability workspace
Probability workspace

Probabilities range from 0 to 1. Check whether the method gives cumulative or exact-count probability.

See the method

Set model parameters

Runs on your device

Your probability

Your result

Let’s calculate.

Use the Calculate button to see your result.

Review the method below for assumptions and conventions.

How to use this tool

  1. Enter population size, marked population items, sample size, marked items drawn.
  2. Select Calculate to view the result.
  3. Check the method and assumptions below before using the result.

Input reference and sample values

Use the units and choices shown for each field. Sample values are provided for practice, not as recommendations.

InputFormat and unitsSample
Population sizeNumeric value. Minimum: 1. Maximum: 100000.20
Marked population itemsNumeric value. Zero or positive. Maximum: 100000.7
Sample sizeNumeric value. Zero or positive. Maximum: 100000.5
Marked items drawnNumeric value. Zero or positive. Maximum: 100000.2

Result for these sample inputs

0.387383901
Mean marked count
1.75

Select Try the example in the form to load these values and calculate them again. This replaces the current form inputs. Compare the result with the method and worked explanation below.

The method, explained

P(X=k)=C(K,k)C(N−K,n−k)/C(N,n). Log-gamma evaluates combinations without factorial overflow.

A WORKED EXAMPLE

Using population size = 20, marked population items = 7, sample size = 5, marked items drawn = 2, the result is 0.387383901. Change these example inputs to match your task; use the method above to check each step.

Understanding your result

Simple random sampling without replacement. Main result is exact-count probability; impossible marked counts have probability zero. Tiny tails can underflow to zero.

What to keep in mind

Simple random sampling without replacement. Main result is exact-count probability; impossible marked counts have probability zero. Tiny tails can underflow to zero. A descriptive or probability calculation under the stated assumptions. Check the sample design and model before interpreting results.

Methodology maintained by ClarityKit. How these tools are built and checked.