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

hypnegbin_cdf(n, q, r, theta, nmax)
% hypnegbin_cdf.m - evaluates a Hyper-Negative Binomial Cumulative Distribution.
%   See "Univariate Discrete Distributions", Johnson, Kemp & Kotz,
%   J. Wiley, p. 320, 2005.
%
%  Created by Jim Huntley,  3/22/07
%

function [cdf] = hypnegbin_cdf(n, q, r, theta, nmax)

sum1 = hypnegbin_pdf(0, q, r, theta, nmax);
for jn = 1:n
    sum1 = sum1 + hypnegbin_pdf(jn, q, r, theta, nmax);
end
cdf = sum1;

return

Contact us