Hypergeometric Distribution Calculator

Calculate exact and cumulative probabilities for sampling without replacement

Calculate hypergeometric probabilities when drawing without replacement from a finite population with a known number of successes.

Example Results

1 examples

Find 2 hearts in a 5-card hand

Model drawing 5 cards without replacement from a 52-card deck with 13 hearts.

{
  "result": {
    "exactProbability": 0.2743
  }
}
View input parameters
{ "populationSize": 52, "populationSuccesses": 13, "draws": 5, "observedSuccesses": 2, "probabilityMode": "exact", "decimalPlaces": 4 }

Key Facts

Category
Math, Date & Finance
Input Types
number, select
Output Type
json
Sample Coverage
4
API Ready
Yes

Overview

The Hypergeometric Distribution Calculator computes the probability of obtaining a specific number of successes in a sequence of draws from a finite population without replacement. It is ideal for statistical analysis in quality control, inventory auditing, and probability modeling where each draw changes the odds of subsequent outcomes.

When to Use

  • When calculating probabilities for card games or lotteries where drawn items are not returned to the pool.
  • During quality control inspections to determine the likelihood of finding defective items in a sample batch.
  • In ecological or demographic studies involving capture-recapture methods from a finite population.

How It Works

  • Enter the total Population Size and the number of Population Successes (e.g., total items and total target items).
  • Specify the number of Draws (sample size) and the target Observed Successes.
  • Select the Probability Mode to calculate exact, at-most, or at-least probabilities.
  • Adjust the decimal places to generate the precise probability result in JSON format.

Use Cases

Quality assurance teams testing a random sample of manufactured goods for defects without returning tested items to the batch.
Data analysts calculating the exact odds of drawing specific card combinations in poker or trading card games.
Auditors reviewing a subset of financial records to estimate the probability of compliance errors in a finite ledger.

Examples

1. Calculating Poker Hand Probabilities

Game Designer
Background
A game designer needs to verify the exact odds of drawing exactly 2 hearts in a standard 5-card poker hand.
Problem
Calculating the exact probability of drawing 2 items from a specific subset of 13 without replacement.
How to Use
Set Population Size to 52, Population Successes to 13, Draws to 5, and Observed Successes to 2. Select 'Exactly k Successes'.
Example Config
{
  "populationSize": 52,
  "populationSuccesses": 13,
  "draws": 5,
  "observedSuccesses": 2,
  "probabilityMode": "exact",
  "decimalPlaces": 4
}
Outcome
The calculator returns an exact probability of 0.2743 (or 27.43%).

2. Batch Defect Inspection

Quality Assurance Manager
Background
A factory produces a batch of 100 widgets, knowing 8 of them are defective. The QA manager tests a random sample of 10 widgets.
Problem
Finding the probability of discovering at least 1 defective widget in the sample.
How to Use
Input 100 for Population Size, 8 for Population Successes, 10 for Draws, and 1 for Observed Successes. Change Probability Mode to 'At Least k Successes'.
Example Config
{
  "populationSize": 100,
  "populationSuccesses": 8,
  "draws": 10,
  "observedSuccesses": 1,
  "probabilityMode": "at-least",
  "decimalPlaces": 4
}
Outcome
The tool calculates the cumulative probability of finding 1 or more defects in the 10-widget sample.

Try with Samples

math-&-numbers

FAQ

What is the difference between hypergeometric and binomial distributions?

Hypergeometric distribution models sampling without replacement, meaning probabilities change after each draw. Binomial distribution assumes sampling with replacement where probabilities remain constant.

What does 'Population Successes' mean?

It refers to the total number of items in the entire population that match the characteristic you are looking for, such as the total number of winning tickets or defective parts.

Can I calculate cumulative probabilities?

Yes, use the Probability Mode dropdown to select 'At Most k Successes' or 'At Least k Successes' for cumulative results.

What are the limits for population size and draws?

The calculator supports population sizes, successes, draws, and observed successes up to 10,000.

Why must the observed successes be less than or equal to the draws?

You cannot draw more successful items than the total number of items you are drawing from the population.

API Documentation

Request Endpoint

POST /en/api/tools/hypergeometric-distribution-calculator

Request Parameters

Parameter Name Type Required Description
populationSize number Yes -
populationSuccesses number Yes -
draws number Yes -
observedSuccesses number Yes -
probabilityMode select No -
decimalPlaces number No -

Response Format

{
  "key": {...},
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
JSON Data: JSON Data

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-hypergeometric-distribution-calculator": {
      "name": "hypergeometric-distribution-calculator",
      "description": "Calculate exact and cumulative probabilities for sampling without replacement",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=hypergeometric-distribution-calculator",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]