Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

 

generates random variates from over 870 univariate distributions

invhyper_cdf(n,N,Np,k)
% 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);
end
cdf = sum1;

return



Contact us