Generation of Random Variates
09 Feb 2012
generates random variates from over 870 univariate distributions
% impinshyp_cdf.m - compute Inverse Hypergeometric Cumulative Distribution.
% See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
% J. Wiley, p.255, 2005.
% Created by: Jim Huntley, 06/18/08.
function [cdf] = invhyper_cdf(n,N,Np,k)
sum1 = invhyper_pdf(1,N,Np,k);
for jn = 2:n
sum1 = sum1 + invhyper_pdf(jn,N,Np,k);
cdf = sum1;