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

exbert1_pdf(n, nn, rho, p)
% exbert1_pdf.m - evaluates an EXBERT Correlation Probability Density.
%   See "Univariate Discrete Distributions", Johnson, Kemp & Kotz,
%   J. Wiley, p.154, 2005.
%
%   NOTE:  This distribution is not normalized!!!
%
%  Created by Jim Huntley,  01/04/07
%

function [pdf] = exbert1_pdf(n, nn, rho, p)

sum1 = 0;
for jj = 1:nn-n+1
    pik = 1;
    if(jj > 1)
        pik = rho * p + (1-rho) * p^(n+jj-1);
    end
    sum1 = sum1 + binomial_coef(nn-n,jj-1) * (-1)^(jj-1) * pik;
end
pdf = binomial_coef(nn,n) * sum1;

return


Contact us