Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley


generates random variates from over 870 univariate distributions

haighthar_pdf(n, Z2)
% haighthar_pdf.m - evaluates a Haight's Harmonic Probability denisity.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   Wiley, p.534, 2005.  
%   Created by  J. Huntley,  03/12/07.

function [pdf] = haighthar_pdf(n, Z2)

pdf = (Z2/(2*n-1) - Z2/(2*n+1)) / Z2;



Contact us