Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley


generates random variates from over 870 univariate distributions

leakurn_cdf(n, p, b, c)
% leakurn_cdf.m - compute Leaking Urn Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.442, 2005.                 
%  Created by:  Jim Huntley,  07/16/07.

function [cdf] = leakurn_cdf(n, p, b, c)

sum1 = leakurn_pdf(0, p, b, c);
for jn = 1:n
    sum1 = sum1 + leakurn_pdf(jn, p, b, c);
cdf = sum1;


Contact us