Documentation/Calc Functions/HYPGEOM.DIST

From The Document Foundation Wiki
Jump to navigation Jump to search


Function name:

HYPGEOM.DIST

Category:

Statistical Analysis

Summary:

Calculates values from either the probability mass function or the cumulative distribution function for the hypergeometric distribution of a sequence. The hypergeometric distribution is a discrete probability distribution that describes the probability of a particular number of successes in a sequence of draws from a finite population without replacement.

Syntax:

HYPGEOM.DIST(X; NSample; Successes; NPopulation; Cumulative)

Returns:

Returns a real number which is the hypergeometric distribution value for the given arguments. It ranges from 0 to 1, i.e. [0,1].

Arguments:

X is a non-negative integer value or a reference to the cell containing that value which is the number of successes achieved in the random sample.

NSample is a non-negative integer value or a reference to the cell containing that value which is the size of the random sample.

Successes is a non-negative integer value or a reference to the cell containing that value which is the number of possible successes in the total population.

NPopulation is a non-negative integer value or a reference to the cell containing that value which is the size of the total population.

Cumulative specifies whether to calculate the probability density function (FALSE or 0) or the cumulative distribution function (any other value).

  • Given arguments must satisfy both these conditions:

0 <= X <= NSample <= NPopulation

0 <= Successes <= NPopulation

or else the function will return an error value.

Additional details:

The formula for HYPGEOM.DIST is:

If Cumulative is FALSE(), HYPGEOM.DIST returns the probability mass function value

Hypegeomeanp.png

If Cumulative is TRUE(), HYPGEOM.DIST returns the cumulative distribution function

Hypegeomeanc.png

where:

Ncr new.png

is COMBIN(n,x)

x = X n = NSample M = Successes N = NPopulation

  • For more details about the hypergeometric distribution, visit Wikipedia.

Examples:

Formula Description Returns
=HYPGEOM.DIST(2;2;90;100) If 90 out of 100 pieces of buttered toast fall from the table and hit the floor with the buttered side first, then if 2 pieces of buttered toast are dropped from the table, the probability is around 81%, that both will strike buttered side first. Here no value for Cumulative is mentioned hence the function calculates probability mass function. 0.809090909090909
=HYPGEOM.DIST(15;30;90;150;TRUE()) The function calculates the cumulative distribution function for the hypergeometric distribution. 0.148888209892056
=HYPGEOM.DIST(15;13;90;150;TRUE()) NSample value is less than X hence the function returns an error value. Err:502

Related LibreOffice functions:

HYPGEOMDIST

ODF standard:

None

Equivalent Excel functions:

HYPGEOM.DIST