Grocer Function

NAME

hypg_rnd - hypergeometric random draws

CALLING SEQUENCE

[x]=hypg_rnd(nobs,n,K,N)

PARAMETERS

Input

Output

DESCRIPTION

Returns hypergeometric random draws
prob(X=x) = (N)^-1 (K) (N-K)
                    (n)         (x)  (n-x)

NOTE: mean = (n/N)*k ; variance = [(n*K)/(N*N)*(N-1)]*(N-K)*(N-n)

EXAMPLE

p=hypg_pdf(100,15,20,30)

AUTHOR

Eric Dubois 2002