Contact

HYPGEOMDIST Function (Calligra Sheets)

Statistical Intermediate Calligra Sheets

Evaluate Calligra HYPGEOMDIST for sampling without replacement, with exact reference probabilities and warnings about incomplete support checks.

Verification status: 21 selected formulas were executed through the Calligra Sheets 25.04.2 calculation engine library. Numerical discrepancies and nonfinite results are retained where present. Version 26.08.2 was source-checked only; no GUI-cell or import claim. How formula examples are checked

Important tested limitation: The 25.04.2 engine can return a negative value for an impossible success count. Such an output is not a probability. Check the feasible support and population constraints before use.

Quick answer: =HYPGEOMDIST(0;4;5;20) gives approximately 0.28173374613 in the tested Calligra calculation engine.

Availability and version history

  • Introduced: First release not established; the name is present in Calligra 2.4.0 source.
  • Supported in: Calligra Sheets 26.08.2, with no retirement established.
  • Scope: Desktop Sheets with the Statistical module. Examples use English semicolon-separated formulas.
  • Checked: October 14, 2026. Selected formulas ran through the official 25.04.2 engine library. Source and independent mathematics were checked. This is engine evidence, with no GUI-cell or import verification; 26.08.2 was source-checked only.

What HYPGEOMDIST returns

HYPGEOMDIST describes successes in a fixed-size sample drawn without replacement. Its valid probability mass is C(M,x)C(N−M,n−x)/C(N,n), where N is population size, M the number of successes in that population, n the number drawn and x the observed successes. Function help.

Syntax and arguments

=HYPGEOMDIST(successes;draws;populationSuccesses;populationSize[;cumulative])

The first four count arguments are required and converted to integers. The optional fifth selects cumulative output; it defaults to zero, meaning a point probability. Use integers satisfying 0≤M≤N, 0≤n≤N and max(0,n−(N−M))≤x≤min(n,M). The implementation does not enforce all of these constraints. Brackets indicate optional arguments and are not entered in the formula. Registration and implementation.

Reproducible engine examples

The engine and mathematical columns are separate. Results are rounded to twelve decimal places, or thirteen significant digits in scientific notation for very small or large values. This is a display choice, not an accuracy guarantee. NaN and infinity are nonfinite outputs; an engine error flag is checked separately from those values.

Formula Engine result Independent mathematical reference
=HYPGEOMDIST(0;4;5;20) 0.28173374613 0.28173374613
=HYPGEOMDIST(1;4;5;20) 0.46955624355 0.46955624355
=HYPGEOMDIST(2;4;5;20) 0.216718266254 0.216718266254
=HYPGEOMDIST(3;4;5;20) 0.030959752322 0.030959752322
=HYPGEOMDIST(4;4;5;20) 0.001031991744 0.001031991744
=HYPGEOMDIST(2;4;5;20;1) 0.968008255934 0.968008255934
=HYPGEOMDIST(1;3;4;10) 0.5 0.5
=HYPGEOMDIST(2;3;4;10;1) 0.966666666667 0.966666666667

Practical worksheet

A population contains 20 items, five of them marked. Drawing four without replacement gives P(X=2)=0.216718266254 and P(X≤2)=0.968008255934. The cumulative result includes zero, one and two marked items. This model differs from independent binomial trials because the composition changes as items are removed.

The reference table lists all five possible outcomes x=0,…,4 for this setup. Their probabilities sum to one, as checked by the executed expression below.

Advanced interpretation and checks

The mean number of successes is nM/N; here it is 1. The variance is n(M/N)(1−M/N)(N−n)/(N−1), which is 12/19 ≈ 0.631578947368. The final factor is the finite-population correction; omitting it would incorrectly use the with-replacement variance.

A critical support example is N=10,M=8,n=8. At least six successes must be drawn, so x=0 has mathematical probability zero. The engine instead returns approximately −0.000001102293 for that input. A second invalid case, M=21,N=20, also returns a number. Neither output should be used in a probability calculation.

The executed advanced check was:

=HYPGEOMDIST(0;4;5;20)+HYPGEOMDIST(1;4;5;20)+HYPGEOMDIST(2;4;5;20)+HYPGEOMDIST(3;4;5;20)+HYPGEOMDIST(4;4;5;20)

Its engine result was 1.

Boundaries and troubleshooting

Fractions are converted toward zero in the tested positive cases: 2.9,4.9,5.9,20.9 reproduce the 2,4,5,20 result. The cumulative flag 0.9 converts to zero and selects the PMF. Negative counts, x>M and n>N are rejected, but those checks alone are insufficient. For an integer cutoff below the feasible support, the correct PMF and lower-tail CDF are zero; above the support, the correct CDF is one. Establish those cases explicitly rather than relying on the invalid-input output.

Formula Engine result
=HYPGEOMDIST(-1;4;5;20) #VALUE!
=HYPGEOMDIST(6;4;5;20) #VALUE!
=HYPGEOMDIST(2;21;5;20) #VALUE!
=HYPGEOMDIST(2;4;21;20) 0.021671826625
=HYPGEOMDIST(4;3;5;20) 0
=HYPGEOMDIST(0;8;8;10) -0.000001102293
=HYPGEOMDIST(0;8;8;10;1) -0.000001102293
=HYPGEOMDIST(2.9;4.9;5.9;20.9) 0.216718266254
=HYPGEOMDIST(2;4;5;20;.9) 0.216718266254
=HYPGEOMDIST("abc";4;5;20) 0.28173374613
=HYPGEOMDIST(2;4;5) #VALUE!
=HYPGEOMDIST(2;4;5;20;1;1) #VALUE!

Official evidence and precision scope

The statistical module and value-calculation helpers are byte-identical between the inspected 25.04.2 and 26.08.2 sources. That comparison supports the source discussion but does not establish later-version native output, every locale or arbitrary extreme-parameter accuracy.