Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley


generates random variates from over 870 univariate distributions

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

function [pdf] = chanegbin_pdf(n, p, pii)

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


Contact us