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

sunil_pdf(n, p, m)
% test_sunil.m - tests a Ved Probability Density.
%   See "Lagrangian Probability Distributions", P.C. Consul & F. Famoye,
%   Birkhauser, 2006, Table 2.1.
%
%   Doesn't normalize for p <~ 0.5 + 0.5*(m-1)/m!!!
%
%  Created by Jim Huntley,  11/11/08
%

function [pdf] = sunil_pdf(n, p, m)

q = 1 - p;
ratio = q / p;

pdf = binomial_coef(m*n,(n-1)/2) * p^(m*n) * ratio^((n-1)/2) / n;

end

Contact us