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

wghtpois_cdf(n,alpha,r,a)
% wghtpois_cdf.m - compute Weighted Poisson Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.488, 2005.                 
%
%  Created by:  Jim Huntley,  10/22/07.
%

function [cdf] = wghtpois_cdf(n,alpha,r,a)

sum1 = wghtpois_pdf(0, alpha, r, a);
for jn = 1:n
    sum1 = sum1 + wghtpois_pdf(jn, alpha, r, a);
end
cdf = sum1;

return



Contact us