Cdf.Hypergeometric Method |
Namespace: Imsl.Stat
public static double Hypergeometric( int k, int sampleSize, int defectivesInLot, int lotSize )
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
where .
If k is greater than or equal to i
and less than or equal to ,
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
.