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

chanegbin_cdf(n, p, pii)
% chanegbin_cdf.m - evaluates a Chain Negative Binomial Cumulative Distribution.
%   See "Univarite Discrete Distributions", Johnson, Kotz, & Kemp, 
%   J. Wiley, p.249, 1994.
%
%  Created by Jim Huntley,  12/03/06
%

function [cdf] = chanegbin_cdf(n, p, pii)

cdf = 1 + (p*pii / (1-p+p*pii)) * ((1-p) / (1-p+p*pii))^n / log((1-p) / (1-p+p*pii));

return

Contact us