Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates



generates random variates from over 870 univariate distributions

binomhyp_cdf(n, p, N1, Np, N2)
% binomhyp_cdf.m - compute Binomial Hypergeometric Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.300, 2005.                  
%  Created by:  Jim Huntley,  11/21/06.

function [cdf] = binomhyp_cdf(n, p, N1, Np, N2)

sum1 = binomhyp_pdf(0, p, N1, Np, N2);

for jn = 1:n
    sum1 = sum1 + binomhyp_pdf(jn, p, N1, Np, N2);

cdf = sum1;


Contact us