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

rutherford_cdf(n,c,p,nn)
% rutherford_cdf.m - compute Rutherford Urn Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.526, 2005.                  
%
%  Created by:  Jim Huntley,  10/18/07.
%

function [cdf] = rutherford_cdf(n,c,p,nn)

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

return



Contact us