Hypergeometric cumulative distribution function
the hypergeometric cdf at each of the values in
the corresponding size of the population,
of items with the desired characteristic in the population,
and number of samples drawn,
N. Vector or matrix
N must all have the same size. A scalar input
is expanded to a constant matrix with the same dimensions as the other
hygecdf(x,M,K,N,'upper') returns the complement
of the hypergeometric cdf at each value in
an algorithm that more accurately computes the extreme upper tail
The hypergeometric cdf is
The result, p, is the probability of drawing up to x of a possible K items in N drawings without replacement from a group of M objects.
Compute Hypergeometric Distribution CDF
Suppose you have a lot of 100 floppy disks and you know that 20 of them are defective. What is the probability of drawing zero to two defective floppies if you select 10 at random?
p = hygecdf(2,100,20,10)
p = 0.6812
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).