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

nbinomtri_cdf(n, theta, alpha)
%nbinomtri_cdf.m - compute Negative Binomial Triangular Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.334, 2005.                 
%
%  Created by:  Jim Huntley,  07/24/07.
%

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

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

return



Contact us