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

maxnegbin_cdf(n, c, p)
% maxnegbin_cdf.m - compute a Maximum Negative Binomial Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, & Kotz,
%   J. Wiley, 2005, p. 245.
%
%  Created by Jim Huntley,  7/11/07
%

function [cdf] = maxnegbin_cdf(n, c, p)

sum1 = maxnegbin_pdf(0, c, p);
for jn = 1:n
    sum1 = sum1 + maxnegbin_pdf(jn, c, p);
end
cdf = sum1;
    
return



Contact us