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

pig_cdf(n, alpha, theta)
% pig_cdf.m - compute Poisson Inverse Gaussian (PIG) Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, & Kotz, 
%   J. Wiley, 2005, 485.    
%
%  Created by:  Jim Huntley,  08/30/07.
%

function [cdf] = pig_cdf(n, alpha, theta)

sum1 = pig_pdf(0, alpha, theta);
for jn = 1:n
    sum1 = sum1 + pig_pdf(jn, alpha, theta);
end
cdf = sum1;

return



Contact us