Hypergeometric Distribution Calculator
Hypergeometric PMF P(X=k).
About this tool
Enter the population size N, the successes in it K, the sample size n and the count you want k. Drawing 5 cards from 52, the chance of exactly one ace is 0.299474.
How to use
How it works
Unlike the binomial, draws are made without replacement, so each one changes the odds for the next. P(X = k) = C(K, k) C(N − K, n − k) ÷ C(N, n). For one ace in five cards: 4 × C(48, 4) ÷ C(52, 5) = 4 × 194,580 ÷ 2,598,960 = 0.299474.
P(X = k) = C(K, k) · C(N − K, n − k) ÷ C(N, n)
Worked example
Matching 3 of 6 lottery numbers
- Input
- N = 49, K = 6, n = 6, k = 3
- Output
- 0.0176504
- Walkthrough
- C(6, 3) × C(43, 3) ÷ C(49, 6) = 20 × 12,341 ÷ 13,983,816 = 0.0176504, about 1 in 57.
Limitations
- Gives P(X = k) only, not a cumulative probability.
- Impossible inputs are rejected with an error: K or n larger than N, a k that cannot be drawn, or negative or non-integer values.
Questions
What is the chance of exactly 2 defectives in a sample of 5 from 50 with 10 defective?
What is the chance of exactly one ace in a 5-card hand?
What is the chance of matching 3 of 6 lottery numbers from 49?
What happens with impossible inputs, such as K larger than N?
Features
- Sampling without replacement
- Exact probability
- Runs in your browser
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
Variables, expressions, and equations
Khan Academy
Algebra language shared by many math calculators.
Watch on YouTubeRectangle area as product of dimensions
Khan Academy
Foundational area thinking across math tools.
Watch on YouTube
- Standard Normal Distribution
Math is Fun
Z-score background for normal-distribution calculators.
- Introductory Statistics
OpenStax
Free textbook for descriptive stats and inference.