Contact

HYPGEOMDIST Function (Gnumeric)

Statistical Intermediate Gnumeric

Calculate exact-count or cumulative sampling probabilities without replacement, with feasible counts and an optional cumulative selector.

Verification status: Selected formulas were recalculated with Gnumeric 1.12.57 using ssconvert and retained workbook results. Gnumeric 1.12.62 was source-checked only; this does not establish every edge case. How formula examples are checked

Quick answer: =HYPGEOMDIST(2,4,8,20) gives approximately 0.381424148607.

Availability and version history

  • Introduced: First release not established from the evidence cited here.
  • Supported in: Gnumeric 1.12.62, confirmed by its function registration. No retirement is established.
  • Scope: Desktop Gnumeric with the Statistics Functions plugin. Tables use English comma-separated formulas.
  • Checked: October 14, 2026. Tables were recalculated in 1.12.57 and finite reference values independently checked. Version 1.12.62 was source-checked, not executed.

What the function calculates

HYPGEOMDIST models sampling without replacement from a finite population containing M successes and Nāˆ’M failures. Its exact-count probability is COMBIN(M,x)ƗCOMBIN(Nāˆ’M,nāˆ’x)/COMBIN(N,n). The draws are dependent because each selected item leaves the population; a binomial model instead assumes a constant probability across independent trials. Official function reference.

Syntax and arguments

=HYPGEOMDIST(x,n,M,N[,cumulative])
Argument Meaning
x Successes in the sample.
n Number drawn without replacement.
M Successes in the full population.
N Total population size.
cumulative Optional; FALSE or omission gives exact-count mass, TRUE gives P(X≤x).

Only bracketed arguments are optional; do not type the brackets. The version-pinned help and evaluator establish the Gnumeric contract.

Reproducible reference cases

The table records the tested release’s outputs, with finite mathematical references rounded to twelve decimal places. Keep full precision when using a result in a later calculation.

Formula Result in Gnumeric 1.12.57, approximately
=HYPGEOMDIST(0,4,8,20) 0.102167182663
=HYPGEOMDIST(1,4,8,20) 0.363261093911
=HYPGEOMDIST(2,4,8,20) 0.381424148607
=HYPGEOMDIST(3,4,8,20) 0.138699690402
=HYPGEOMDIST(4,4,8,20) 0.014447884417
=HYPGEOMDIST(2,4,8,20,1) 0.846852425181
=HYPGEOMDIST(0,0,8,20) 1
=HYPGEOMDIST(1,2,3,5) 0.6

Practical worksheet

Suppose a batch contains 20 parts, of which 8 have a marked property. Draw 4 without replacement. Put 2, 4, 8 and 20 in A2:D2 and enter =HYPGEOMDIST(A2,B2,C2,D2). The probability of exactly two marked parts is approximately 0.381424148607. Add TRUE() as the fifth argument to obtain the probability of at most two, approximately 0.846852425181. Define ā€œsuccessā€ consistently before entering the counts; it can describe a defect or a desirable property.

Advanced examples and independent checks

For at least two marked parts, use =1-HYPGEOMDIST(1,4,8,20,TRUE()), approximately 0.534571723426. The complement removes zero and one, so subtracting the CDF at 2 would answer ā€œat least threeā€ instead.

As a check, the first five exact-count probabilities in the table sum to 1. They cover all possibilities from zero through four marked parts. A binomial approximation with four trials and p=0.4 gives 0.3456 for exactly two, which differs from the finite-population result. COMBIN helps reconstruct the exact-count formula using integer combinations.

Input boundaries and common mistakes

All four counts are floored in the evaluator. Use integers with 0≤M≤N and 0≤n≤N deliberately. Feasible x lies between max(0,nāˆ’(Nāˆ’M)) and min(n,M). Some impossible success counts return zero, while invalid population relationships produce #NUM!; do not treat these as the same input condition. The optional fifth argument is a Gnumeric contract, not a reason to assume another program accepts it.

These additional outcomes were observed in the same native recalculation. F5 was genuinely empty; it is not an omitted argument. Missing inputs still need deliberate validation, even if they are converted to a numeric zero.

Formula Observed in 1.12.57
=HYPGEOMDIST(2.9,4.9,8.9,20.9) 0.381424148607
=HYPGEOMDIST(5,4,8,20) 0
=HYPGEOMDIST(0,4,8,10) 0
=HYPGEOMDIST(1,2,6,5) #NUM!
=HYPGEOMDIST(1,6,3,5) #NUM!
=HYPGEOMDIST(F5,4,8,20) 0.102167182663

The worked calculations do not certify every locale, imported text value, extreme parameter or later binary version. Shared numerical helpers can change even when a function’s wrapper remains the same.

Sources and verification

The reference and boundary tables use recorded 1.12.57 command-line recalculation. Further model examples were independently calculated from their stated inputs; they are not additional native test claims.