Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley (view profile)


generates random variates from over 870 univariate distributions

nexceed_pdf(n, m, r, nn)
% nexceed_pdf.m - evaluates a Number of Exceedances Probability Density.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.255, 2005. 
%  Created by Jim Huntley,  8/03/07

function [pdf] = nexceed_pdf(n, m, r, nn)

%persistent coef

    coef = r * binomial_coef(m,r) / (m+nn);

pdf = coef * binomial_coef(nn,n) / binomial_coef(m+nn-1,r+n-1);


Contact us