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

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

%if(isempty(coef))
    coef = r * binomial_coef(m,r) / (m+nn);
%end

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

return


Contact us