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

poisgam_pdf(x, b, n, p)
% poisgam_pdf.m - evaluates a Poisson Gamma Probability Density.
%   See "Laplace Transforms, Mellin Transforms and Mixed Poisson Processes", 
%   P. Albrecht, Scand. Actuarial J., vol.1, p.58, 1984.
%   Vector form of PDF!!!
%  Created by Jim Huntley,  06/15/09

function [pdf] = poisgam_pdf(x, b, n, p)

%persistent coef

    coef = (p-1) * b^(p-1) / (n * beta(n,p));

pdf = coef .* x.^n ./ (b+x).^(n+p);


Contact us