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

genbeta2_pdf(x, a, b, gam)
% genbeta2_pdf.m - evaluatess a Generalized Beta II Probability Density.
%   See "A Generalized Beta Distribution II",  S. Nadarajah and S. Kotz 
%  Created by Jim Huntley,  02/09/10

function [pdf] = genbeta2_pdf(x, a, b, gam)

%persistent coef

    coef = b * beta(a,b) / beta(a,b+gam);

pdf = coef .* x.^(a+b-1) .* pfq([1-gam,a],a+b,x);


Contact us