Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

lagpois_pdf(n, theta, alpha)
% lagpois_pdf.m - evaluates a Lagrangian Poisson Probability Density.
%   See "Some Characterizations for the Exponential Class of Distributions", 
%   P. C. Consul, IEEE trans. on Reliability, vol. 44, No. 3, Sept., 1995.
%
%  Created by Jim Huntley,  8/02/06
%

function [y] = lagpois_pdf(n, theta, alpha)

%y = (1+alpha*n)^(n-1) * theta^n * exp(-theta*(1+alpha*n)) / exp(gammaln(n+1));
y = exp((n-1)*log(1+alpha*n) + n*log(theta) - theta*(1+alpha*n) - gammaln(n+1));

return

Contact us