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

lindley_cdf(n, theta)
% lindley_cdf.m - compute Poisson-Lindley Cumulative Distribution Function.
%   JSTOR Note 275: The Discret Poisson-Lindley Distribution", Biometrics,
%   Vol. 26, No.1, 1970, p.145.
%   links.jstor.org/sici?sici=0006-341X(197003)26%3A1%3C145%3A2NTDPD%3E2.0.CO%3B2-H.
%
%  Created by:  Jim Huntley,  09/30/05.
%

function [cdf] = lindley_cdf(n, theta)

sum1 = lindley_pdf(0, theta);
for jn = 1:n
    sum1 = sum1 + lindley_pdf(jn, theta);
end
cdf = sum1;
    
return



Contact us