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

poislind_pdf(n, alpha)
% poislind_pdf.m - evaluates a Poisson Lindley Probability Density.
%   See "A Unified Approach to Some Mixed Poisson Distributions", 
%   M.E. Ghitany and S.A. Al-Awadhi, Tamsui Oxfors J. of Math. Sciences, p.147, 2001.
%
%  Created by Jim Huntley,  04/15/09
%

function [pdf] = poislind_pdf(n, alpha)

%persistent a2 ap1

%if(isempty(a2))
    a2 = alpha^2;
    ap1 = alpha+1;
%end

pdf = a2 * (alpha+2+n) / ap1^(n+3); 

return

Contact us