2.1.24.5.1.9 hygecdf
Description
Hypergeometric distribution cdf. Computes the probabilities in given value , associated with a hypergeometric distribution
The lower tailed probability of the hypergeometric distribution
where
- : The population size
- : The number of success states in the population
- : The number of samples drawn
Syntax
double hygecdf( const int iK, int m, int n, int l, int iTail = TAILED_TEST_DISC_LOWER, int * nFail = NULL )
Parameters
- iK
- [input] integer k which defines the required probabilities.
- m
- [input] parameter m of the hypergeometric distribution.
- n
- [input] parameter n of the hypergeometric distribution.
- l
- [input] parameter l of the hypergeometric distribution.
- iTail
- [input] int,
- TAILED_TEST_DISC_LOWER. lower tail. .
- TAILED_TEST_DISC_UPPER. upper tail. .
- TAILED_TEST_DISC_POINT. point probability. .
- nFail
- [output] on successful exit, it returns the NAG error code NE_NOERROR; if an error or warning has been detected, then it returns the specific error or warning code.
Return
Returns Hypergeometric distribution cdf
Examples
EX1
void hygecdf_ex1()
{
double iK[]= {2, 5, 10};
int m= 20, n=100, l=10;
for(int ii = 0; ii<3; ii++)
printf("%f: %f\n", iK[ii], hygecdf(iK[ii],m,n,l));
}
Remark
See Also
Header to Include
origin.h
Reference
|