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

neghyper_cdf(n,N,a,b)
% neghyper_cdf.m - compute Negative Hypergeometric Cumulative Distribution Function.
% "Recursions for Compound Distributions",
%     H. Panjer & G. Wilmot, ASTIN Bull, Vol. 13, No. 1, p. 1.               
%
%  Created by:  Jim Huntley,  02/26/07.
%

function [cdf] = neghyper_cdf(n,N,a,b)

sum1 = neghyper_pdf(0, N, a, b);
for jn = 1:n
    sum1 = sum1 + neghyper_pdf(jn, N, a, b);
end
cdf = sum1;

return



Contact us