Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley (view profile)


generates random variates from over 870 univariate distributions

invpolegg_cdf(n, nn, a, b, s)
% invpolegg_cdf.m - evaluates an Inverse Polya Eggenberger Cumulative Distribution.
%   See "A Generalized Ploya-Eggenberger Model Generating Various Discrete 
%   Probability Distributions", Indian J. of Stat., v.58, Ser A, Pt.2, p243, 1996.
%  Created by Jim Huntley,  08/19/11

function [cdf] = invpolegg_cdf(n, nn, a, b, s)

sum1 = invpolegg_pdf(0, nn, a, b, s);
for jn = 1:n
    sum1 = sum1 + invpolegg_pdf(jn, nn, a, b, s);
cdf = sum1;


Contact us