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

geompois_pdf(n, lambda, theta)
% geompois_pdf.m - evaluates a Geometric Poisson Probability Density.
%   See "Cumulative Distribution Function of a Geometric Poisson Distribution.", 
%   G. Nuel, Universite d'Evry, val d'Essonne, October, 2005.
%
%  Created by Jim Huntley,  7/07/06
%

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

z = lambda * theta / (1 - theta);  
pdf = exp(-lambda) * (1-theta)^n * z * exp(-z) * genHyper(n+1,2,z);

return

Contact us