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

poispois_pdf(n, lambda, theta)
% poispois_pdf.m - evaluates a Poisson-Poisson Probability Density.
%   See "The Branching Process Method in Lagrange Random Variate Generation", L. Devroye.
%  Created by Jim Huntley,  5/19/05

function [pdf] = poispois_pdf(n, lambda, theta)

%pdf = lambda * (lambda+theta*n)^(n-1) * exp(-(lambda+theta*n)) / factorial(n);
pdf = lambda * exp((n-1)*log(lambda+theta*n) - (lambda+theta*n) - gammaln(n+1));


Contact us