Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates



generates random variates from over 870 univariate distributions

shlogzero_pdf(n, theta, k)
% shlogzero_pdf.m - evaluates a Shifted Log Zero Probability Density.
%   See "Univariate Discrete Distributions", Johnson, Kemp, & Kotz, 
%   J. Wiley, 2005, 318. 
%  Created by Jim Huntley,  7/06/07

function [pdf] = shlogzero_pdf(n, theta, k)

%persistent lomthet 

    lomthet = log(1-theta);

pdf =  theta^(n-k+1) / ((k-n-1) * lomthet);

Contact us