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

dissurv_pdf(n, theta, bet)
% dissurv_pdf.m - evaluates a Discrete Survival Probability Density.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.325, 2005. 
%
%  Created by Jim Huntley,  12/15/06
%

function [pdf] = dissurv_pdf(n, theta, bet)

%persistent A

%if(isempty(A))
    A = 1 / lerch(theta,bet,1);
%end

pdf = A * theta^(n-1) / n^bet;

return


Contact us