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

rgp_pdf(n, a, alpha)
% rgp_pdf.m - evaluates a Restricted Generalized Poisson Probability Density.
%   See "Some Aspects of a Sub-Class of Modified Power Series Distributions",
%   S. Chakraborty, Dibrugargh U., 
%   NOTE:  In order to run in a reasonable time, keep |a*alpha| ~< 0.9 !!!
%  Created by Jim Huntley,  01/14/08

function [pdf] = rgp_pdf(n, a, alpha)

pdf = exp((n-1)*log(1+n*alpha) + n*log(a) - a*(1+alpha*n) - gammaln(n+1));


Contact us