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

nbinordk_cdf(n,k,p,r,b)
% nbinordk_cdf.m - compute Negative Binomial Order k Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.458, 2005.                  
%
%  Created by:  Jim Huntley,  07/19/07.
%

function [cdf] = nbinordk_cdf(n,k,p,r,b)

sum1 = nbinordk_pdf(k,k,p,r,b);
for jn = k+1:n
    sum1 = sum1 + nbinordk_pdf(jn,k,p,r,b);
end
cdf = sum1;

return



Contact us