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

betaprime_pdf(x, alpha, bet)
% betaprime_pdf.m - evaluates a Beta Prime Probability Density.
%   See web, "http://mathworld.wolfram.com/BetaPrimeDistribution.html".
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  10/03/05.
%

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

%persistent denom

%if(isempty(denom))
    denom = beta(alpha,bet);
%end

pdf = x.^(alpha-1) .* (1+x).^(-alpha-bet) ./ denom;

return

Contact us