Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

delteja_pdf(n, p, nn)
% delteja_pdf.m - evaluates a Delta Teja Probability Density.
%   See "Lagrangian Probability Distributions", P.C. Consul & F. Famoye,
%   Birkhauser, 2006, Table 2.2.
%
%   Doesn't normalize for p >~ 0.33 !!!
%
%  Created by Jim Huntley,  11/13/08
%

function [pdf] = delteja_pdf(n, p, nn)

q = 1 - p;
pdf = 2 * nn * binomial_coef((3*n-nn)/2,n) * p^((n-nn)/2) * q^n / (3*n-nn);

end

Contact us