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

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

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

argx = (x ./ b).^a;
pdf = abs(a) .* x.^(a*p-1) .* (1-(1-c).*argx).^(q-1) ./ ...
      (b^(a*p) .* beta(p,q) .* (1+c.*argx).^(p+q));

return

Contact us