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

beta2_pdf(x, b, p, q)
% beta2_pdf.m - evaluates a Beta2 Probability Density Distribution.
%   See "Averaging Income Distributions", Griffiths et al., .pdf (preprint?).
%
%  Created by Jim Huntley,  12/28/03
%
%

function [pdf] = beta2_pdf(x, b, p, q)

%persistent coef

%if(isempty(coef))
    coef = 1 / (b^p * beta(p,q));
%end

pdf = coef * x^(p-1) / (1+(x/b))^(q+p);

return

Contact us