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

poisbin2_cdf(n,lambda,q,nn,nmax)
% poisbin2_cdf.m - compute Poisson Binomial 2 Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.401, 2005.                 
%
%  Created by:  Jim Huntley,  08/20/07.
%

function [cdf] = poisbin2_cdf(n,lambda,q,nn,nmax)

sum1 = poisbin2_pdf(0,lambda,q,nn,nmax);
for jn = 1:n
    sum1 = sum1 + poisbin2_pdf(jn,lambda,q,nn,nmax);
end
cdf = sum1;

return



Contact us