Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley


generates random variates from over 870 univariate distributions

trggsd_pdf(n, alpha, bet)
% trggsd_pdf.m - evaluates a Truncated 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/22/11

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

betn = bet * n;
pdf = binomial_coef(1+betn,n) * alpha^(n-1) * (1-alpha)^(1+betn-n) / (1+betn);


Contact us