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

poisnbin_cdf(n,p,P,m,k)
% poisnbin_cdf.m - compute Poisson Negative binomial Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.333, 2005.                 
%
%  Created by:  Jim Huntley,  09/10/07.
%

function [cdf] = poisnbin_cdf(n,p,P,m,k)

sum1 = poisnbin_pdf(0,p,P,m,k);
for jn = 1:n
    sum1 = sum1 + poisnbin_pdf(jn,p,P,m,k);
end
cdf = sum1;

return



Contact us