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

good_pdf(n, q, eta)
% good_pdf.m - evaluates a Good Probability denisity.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   Wiley, p.530, 2005.  See also "http://mathworld.wolfram.com/Partition.html".
%
%   Created by  J. Huntley,  03/08/06.
%
%   Calls:  'lerch.m'
%

function [pdf] = good_pdf(n, q, eta)

%persistent coef

%if(isempty(coef))
    coef = 1 / lerch(q, eta, 1);
%end

pdf = coef * q^(n-1) / n^eta;

return


    

Contact us