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

pearson2_pdf(x, a, b)
% pearson2_pdf.m - evaluates a Pearson II Probability Density.
%   See "Non-Uniform Random Deviates", L. Devroye, Chapter 9.
%
%  Created by Jim Huntley,  08/18/06
%
%  Vector Form of the PDF!!!
%

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

C = 1 / (a^(-2*b)*(a^2)^b*gamma(b+1)/(1/a^2)^(1/2)*pi^(1/2)/gamma(b+3/2));
pdf =  C .* (1-(x./a).^2).^b;

return

Contact us