Generation of Random Variates
09 Feb 2012
generates random variates from over 870 univariate distributions
|poishyper_cdf(n, N, Np, nn, phi)
% poishyper_cdf.m - compute Poisson Hypergeometric Cumulative Distribution Function.
% See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
% J. Wiley, p.372, 2005.
% Created by: Jim Huntley, 08/22/07.
function [cdf] = poishyper_cdf(n, N, Np, nn, phi)
sum = poishyper_pdf(0, N, Np, nn, phi);
for jn = 1:n
sum = sum + poishyper_pdf(jn, N, Np, nn, phi);
cdf = sum;