Click or drag to resize
CdfHypergeometric Method
Evaluates the hypergeometric cumulative probability distribution function.

Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
public static double Hypergeometric(
	int k,
	int sampleSize,
	int defectivesInLot,
	int lotSize
)

Parameters

k
Type: SystemInt32
An int, the argument at which the function is to be evaluated.
sampleSize
Type: SystemInt32
An int, the sample size, n.
defectivesInLot
Type: SystemInt32
An int, the number of defectives in the lot, m.
lotSize
Type: SystemInt32
An int, the lot size, l.

Return Value

Type: Double
A double, the probability that a hypergeometric random variable takes a value less than or equal to k.
Remarks

Method Cdf.Hypergeometric evaluates the distribution function of a hypergeometric random variable with parameters n, l, and m. The hypergeometric random variable X can be thought of as the number of items of a given type in a random sample of size n that is drawn without replacement from a population of size l containing m items of this type. The probability function is

\Pr\left({X=j}\right)=\frac{{\left(
            {_j^m }\right)\left({_{n-j}^{l-m}}\right)}}{{\left({_n^l}\right)}}
            {\rm{for}}\,\,j=i,\;i+1,\,\,i+2,\;\ldots,\;\min\left({n,m}\right)

where i={\rm max}(0,n-l+m).

If k is greater than or equal to i and less than or equal to \min (n, m), Cdf.Hypergeometric sums the terms in this expression for j going from i up to k. Otherwise, Cdf.Hypergeometric returns 0 or 1, as appropriate. So, as to avoid rounding in the accumulation, Cdf.Hypergeometric performs the summation differently depending on whether or not k is greater than the mode of the distribution, which is the greatest integer less than or equal to (m+1)
            (n+1)/(l+2).

See Also

Reference

Other Resources