Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

pearson6_pdf(x, a, b)
% pearson6_pdf.m - evaluates the Pearson 6 PDF.  
% See "Non-Uniform Random Deviates", L. Devroye, McGill, p.427, web.
%
% Vector Form!
%
% Created by:   Jim Huntley,  07/19/05.
%

function [pdf] = pearson6_pdf(x, a, b)

B = exp(gammaln(a) + gammaln(b) - gammaln(a+b));
pdf = x.^(a-1) ./ (B .* (1+x).^(a+b));

return

Contact us