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

poispear3_int_pdf(n,a,b,t,c)
% poispear3_int_pdf.m - evaluates a Discrete Poisson Pearson III Probability Density.
%   See "Laplace Transforms, Mellin Transforms and Mixed Poisson Processes", 
%   P. Albrecht, Scand. Actuarial J., vol.1, p.58, 1984. 
%
%  Created by Jim Huntley,  09/23/09
%

function [pdf] = poispear3_int_pdf(n,a,b,t,c)

persistent coef tpb z

if(isempty(coef))
    coef = a*log(b) - c*t;
    tpb = t + b;
    z = c * tpb;
end

pdf = exp(coef + n*log(t) - (n+a)*log(tpb) + n*log(z) + ...
          log(genHyper([-n,a],[],-1/z)) - gammaln(n+1));

return

Contact us