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

betageom_pdf(n, alpha, bet)
% betageom_pdf.m - evaluates a Beta Geometric Probability Density.
%   See "A Compendium of Distributions", ModelRisk 3.0, Vose Software,
%  Created by Jim Huntley,  08/13/11

function [pdf] = betageom_pdf(n, alpha, bet)

%persistent coef

    coef = bet * exp(gammaln(alpha+bet) - gammaln(alpha));

pdf = coef * exp(gammaln(alpha+n) - gammaln(alpha+bet+n+1));


Contact us