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

genbeta3p_pdf(x, a1, a2, lambda)
% genbeta3p_pdf.m - tests a Generalized beta 3-Parameter Probability Density.
%   See "Continuous Univariate Distributions", Johnson, Kotz & Balakrishnan,
%   Vol. 2, J. Wiley, 1995, p.251.
%
%  Created by Jim Huntley,  10/20/08
%

function[pdf] = genbeta3p_pdf(x, a1, a2, lambda)

%persistent a1pa2 coef

%if(isempty(coef))
    a1pa2 = a1 + a2;
    coef = lambda^a1  / beta(a1,a2);
%end

pdf = coef .* x.^(a1-1) .* (1-x).^(a2-1) ./ (1-(1-lambda).*x).^a1pa2;

return



Contact us