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

bin1ordk_cdf(n,k,p,nn)
% bin1ordk_cdf.m - compute Type I Binomial Order k Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.462, 2005.                  
%
%  Created by:  Jim Huntley,  10/12/07.
%

function [cdf] = bin1ordk_cdf(n,k,p,nn)

sum = bin1ordk_pdf(0,k,p,nn);
for jn = 1:n
    sum = sum + bin1ordk_pdf(jn,k,p,nn);
end
cdf = sum;

return



Contact us