hygecdf

The hygecdf function calculates the hypergeometric cumulative distribution.

Synopsis

hygecdf(x,m,n,k,lower_tail)

Summary

The hypergeometric cumulative distribution function, with the following parameters:

  • x number of white marbles drawn without replacement from a jar containing both black and white marbles.

  • m number of white marbles in the jar.

  • n number of black marbles in the jar.

  • k number of marbles drawn from the jar.

  • lower_tail,  set to TRUE for lower-tail quantile, FALSE for upper-tail quantile.

Examples

To show the hypergeometric cumulative distribution function, create and populate the array, then calculate the hypergeometric cumulative distribution function, all within a single AFL statement:

AFL% apply(apply(build(<x:int64>[i=0:0],3),m,4,n,4,k,4),cdf,hygecdf(x,m,n,k));


The output is:

{i} x,m,n,k,cdf 
{0} 3,4,4,4,0.985714