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

poischi_int_pdf(n, b, t, p)
% poischi_int_pdf.m - evaluates a Poisson Chi Probability Density.
%   See "Laplace Transforms, Mellin Transforms and Mixed Poisson Processes", 
%   P. Albrecht, Scand. Actuarial J., vol.1, p.58, 1984 and
%   http://mathworld.wolfram.com/ParabolicCylinderFunction.html.
%
%  Created by Jim Huntley,  09/22/09
%

function [pdf] = poischi_int_pdf(n, b, t, p)

z = t / sqrt(2*b);
nu = -(n+p);    
D =  real(2^(nu/2) * (-1i*z)^(1/4) * (1i*z)^(1/4) * KummerU(-nu/2,1/2,0.5*z^2)) / sqrt(z); 
pdf = 2^(1-(n+p)/2) *  b^(-0.5*n) * t^n * D * exp(gammaln(n+p)-gammaln(n+1)-gammaln(p/2));

return

Contact us