Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley (view profile)


generates random variates from over 870 univariate distributions

ggsd_pdf(n, alpha, bet)
% ggsd_pdf.m - evaluates a Generalized Geometric Series Distribution Probability Density.
%   See "New Generalizations of Generalized Geometric Series Distributions",   
%   A. Hassan, African J. of Math and Comp Sci Research, vol.3, no.5, May, 2010. 
%  Created by Jim Huntley,  08/24/11

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

lalph = log(alpha);
loma = log(1 - alpha);

pdf = exp(gammaln(bet*n+1) + n*lalph + (1+bet*n-n)*loma - ...
                  gammaln(n+1) - gammaln(bet*n-n+2));


Contact us