hygeinv

Hypergeometric inverse cumulative distribution function

Syntax

hygeinv(P,M,K,N)

Description

hygeinv(P,M,K,N) returns the smallest integer X such that the hypergeometric cdf evaluated at X equals or exceeds P. You can think of P as the probability of observing X defective items in N drawings without replacement from a group of M items where K are defective.

Examples

Suppose you are the Quality Assurance manager for a floppy disk manufacturer. The production line turns out floppy disks in batches of 1,000. You want to sample 50 disks from each batch to see if they have defects. You want to accept 99% of the batches if there are no more than 10 defective disks in the batch. What is the maximum number of defective disks should you allow in your sample of 50?

x = hygeinv(0.99,1000,10,50)
x =
   3

What is the median number of defective floppy disks in samples of 50 disks from batches with 10 defective disks?

x = hygeinv(0.50,1000,10,50)
x =
   0
Was this topic helpful?