Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

compbeta_pdf(x, alpha, bet)
% compbeta_pdf.m - evaluates a Complementary Beta Probability Density.
%   See "On a Class of Distributions defined by the Relationship Between 
%   their Density and Distribution Functions", M.C. Jones,
%   http://stats-www.open.ac.uk/TechnicalReports/commstatjones.pdf. 
%
%  Created by Jim Huntley,  09/17/11
%

function [pdf] = compbeta_pdf(x, alpha, bet)

oma = 1 - alpha;
omb = 1 - bet;
cdf = betaincinv(x,oma,omb);
pdf = beta(oma,omb) .* cdf.^alpha .* (1 - cdf).^bet;

return

Contact us