Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates



generates random variates from over 870 univariate distributions

mrgenbeta_pdf(x, a, b, p, q)
% mrgenbeta_pdf.m - evaluates a McDonald & Richards Generalized Beta Probability Density.
%   See "Handbook of Beta Distribution and Its Applications", A.K Gupta &,
%   S. Nadarajah, p.118, 2004. 
%  Created by Jim Huntley,  03/09/11

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

%persistent coef

    coef = abs(p) / (q^(a*p) * beta(a,b));

argx = (x./q).^p;
pdf = coef .* x.^(a*p-1) .* (1-argx).^(b-1);


Contact us