Grocer Function
NAME
hypg_rnd - hypergeometric random draws
CALLING SEQUENCE
[x]=hypg_rnd(nobs,n,K,N)
PARAMETERS
Input
-
nobs = number of draws
-
n,K,N = parameters of the distribution
Output
-
x = a vector of random draws from the distribution
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