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

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

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

%persistent lomthet a

%if(isempty(lomthet))
    lomthet = log(1-theta);
    sum1 = 0;
    for ji = 1:k
        sum1 = sum1 + theta^(ji-1);
    end
%end

pdf =  omomeg * theta^n / (-n * lomthet);
    
return

Contact us