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

takacs_pdf(n, P, mu)
% takacs_pdf.m - evaluates a Takacs Probability Density.
%   See "A Generalized Ploya-Eggenberger Model Generating Various Discrete 
%   Probability Distributions", Indian J. of Stat., v.58, Ser A, Pt.2, p243, 1996.
%
%  Created by Jim Huntley,  08/18/11
%

function [pdf] = takacs_pdf(n, P, mu)

Q = 1 + P;
pdf = mu * binomial_coef((mu+1)*n-1,n-1) * (P/Q)^(n-1) / (((mu+1)*n-1)*Q^(mu*n));

return

Contact us