k = qhypg(p,n,K,N) Input p probability (scalar, vector or matrix) n,K,N nonnegative integers such that n<= N, K<= N and n-k<= N-K N is the total number of elements of the population n is the number of elements which are randomly extracted K is the number of elements of the population which have the studied property Output k for each p, k is the smallest integer j so that P(X <= j) >= p.