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

binnegbin_cdf(n, p, m, P, k)
% binnegbin_cdf.m - compute Binomial Negative Binomial Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.33, 2005.                  
%
%  Created by:  Jim Huntley,  11/27/06.
%

function [cdf] = binnegbin_cdf(n, p, m, P, k)

sum1 = binnegbin_pdf(0, p, m, P, k);

for jn = 1:n
    sum1 = sum1 + binnegbin_pdf(jn, p, m, P, k);
end

cdf = sum1;

return



Contact us