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

lindley_pdf(n, theta)
% lindley_pdf.m - evaluates a Poisson-Lindley Probability Density.
%   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 [pdf] = lindley_pdf(n, theta)

pdf = (theta.^2 * (theta + 2 + n)) / (theta + 1)^(n+3);

return

Contact us