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

negbinbin_cdf(n, q, Q, k, nn)
% negbinbin_cdf.m - compute Negative Binomial Binomial Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.483, 2005.                 
%
%  Created by:  Jim Huntley,  07/17/07.
%

function [cdf] = negbinbin_cdf(n, q, Q, k, nn)

sum1 = negbinbin_pdf(0, q, Q, k, nn);
for jn = 1:n
    sum1 = sum1 + negbinbin_pdf(jn, q, Q, k, nn);
end
cdf = sum1;

return



Contact us