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

genbeta2_cdf(x, a, b, gam)
% genbeta2_cdf.m - evaluatess a Generalized Beta II Cumulative Distribution.
%   See "A Generalized Beta Distribution II",  S. Nadarajah and S. Kotz 
%   http://interstat.statjournals.net/YEAR/2003/articles/0312002.pdf.
%
%  Created by Jim Huntley,  02/09/10
%

function [cdf] = genbeta2_cdf(x, a, b, gam)

%persistent coef

%if(isempty(coef))
    coef = b * beta(a,b) / ((a+b)*beta(a,b+gam));
%end

cdf = coef .* x.^(a+b) .* pfq([1-gam,a],a+b+1,x);

return

Contact us