Statistics
Hypergeometric distribution API
Computes hypergeometric probabilities for k successes in n draws without replacement from a population of N with K successes (exact/at-most/at-least), plus mean and variance. Answers 'What is the probability of drawing k specific items without replacement?', 'What is the hypergeometric PMF?'.
Price$0.06per request
MethodPOST
Route/v1/stats/hypergeometric-probability
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
statisticshypergeometricdistributionprobabilitywithout-replacementsamplingpmfdiscrete
API URL
Integration docshttps://x402.hexl.dev/v1/stats/hypergeometric-probabilityExample request
{
"N": 50,
"K": 5,
"n": 10,
"k": 1
}Example response
{
"N": 50,
"K": 5,
"n": 10,
"k": 1,
"mode": "exact",
"probability": 0.4313372,
"exact": 0.4313372,
"atMost": 0.74189998,
"atLeast": 0.68943722,
"mean": 1,
"variance": 0.734694,
"rating": "plausible",
"interpretation": "Hypergeometric(N=50,K=5,n=10): P(X = 1) = 0.431337."
}Input schema
{
"type": "object",
"required": [
"N",
"K",
"n",
"k"
],
"properties": {
"N": {
"type": "integer",
"examples": [
50
]
},
"K": {
"type": "integer",
"examples": [
5
]
},
"n": {
"type": "integer",
"examples": [
10
]
},
"k": {
"type": "integer",
"examples": [
1
]
},
"cumulative": {
"type": "string",
"enum": [
"exact",
"atMost",
"atLeast"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}