Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

 

generates random variates from over 870 univariate distributions

wtdeltpois_pdf(n, lambda, nn)
% wtdeltpois_pdf.m - evaluates a Weighted Delta Poisson Probability Density.
%   See "Lagrangian Probability Distributions", P.C. Consul & F. Famoye,
%   Birkhauser, 2006, Table 1.1.
%
%   Doesn't normalize for m*p >~ 1 !!!
%
%  Created by Jim Huntley,  11/25/08
%

function [pdf] = wtdeltpois_pdf(n, lambda, nn)

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

return

Contact us