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

invhyper_pdf(n,N,Np,k)
% invhyper_pdf.m - evaluates an Inverse Hypergeometric Distribution.
%  "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%  J. Wiley, 2005, p.255. 
%
%  Cretaed by:  J. Huntley, 06/19/07.
%

function [pdf] = invhyper_pdf(n,N,Np,k)

pdf = binomial_coef(Np,k-1) * (Np-k+1) * binomial_coef(N-Np,n-k) / ...
      ((N-n+1) * binomial_coef(N,n-1));

return
    

Contact us