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

hyperpois_pdf(n, theta, lambda)
% hyperpois_pdf.m - evaluates a Hyper-Poisson Probability Density.
%   See "Estimation of the Parameter of Hyper-Poisson Distribution Using Negative Moments", 
%   A. Roohi and M. Ahmad, Pak. J. Statist., v. 19, 2003, p.99.
%
%  Created by Jim Huntley,  8/02/06
%

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

C = 1 / genHyper(1,lambda,theta);

l(1:100) = 0;
l(1) = 1;
for jn = 1:n
    l(jn+1) = l(jn) * (lambda+jn-1);
end

pdf = C * theta^(n) / l(n+1);

return

Contact us