Function HyperGeometric(ProbabilityOfSuccess, NumberOfTries, PopulationSize)

HyperGeometric

The function HyperGeometric draws a random value from a hypergeometric distribution.

HyperGeometric(
    ProbabilityOfSuccess,   ! (input) numerical expression
    NumberOfTries,          ! (input) integer expression
    PopulationSize          ! (input) integer expression
              )

Arguments

ProbabilityOfSuccess

A scalar numerical expression in the range \((0,1)\).

NumberOfTries

A integer numerical expression in the range \(1,\dots,{PopulationSize}\).

PopulationSize

A integer numerical expression \(> 0\).

Return Value

The function HyperGeometric returns a random value drawn from a hypergeometric distribution with a probability of success ProbabilityOfSuccess, number of tries NumberOfTries and population size PopulationSize.

Note

The probability of success ProbabilityOfSuccess must assume one of the values \(i/{size}\), where \(i\) is in the range \(1,\dots,{PopulationSize}-1\).

See also

The HyperGeometric distribution is discussed in full detail in Discrete Distributions of the Language Reference.