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

hurwitz_pdf(n, eta, ups)
% hurwitz_pdf.m - evaluates a Hurwitz Probability Density.
%   See "Univariate Discrete Distributions", Johnson, Kemp & Kotz,
%   J. Wiley, p. 530, 2005.
%
%  Created by Jim Huntley,  3/14/07
%
%   Calls:  'lerch.m'
%

function [pdf] = hurwitz_pdf(n, eta, ups)

%persistent odzet

%if(isempty(odzet))
    odzet = 1 / lerch(1,eta,ups+1);
%end

pdf = (n+ups)^(-eta) * odzet;

return

Contact us