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

polya_pdf(x, bet, lambda, theta)
% polya_pdf.m - evaluates a Polya-Aeppli Probability Density.
%   See "Non-Uniform Random Variates", L. Devroye, Springer-Verlag, 1986, p.468-9.
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  8/20/04
%

function [pdf] = polya_pdf(x, bet, lambda, theta)

C = (2/bet)^(lambda-1) * theta^lambda * exp(-0.25*(bet^2)/theta);

pdf = C .* x.^((lambda-1)/2) .* exp(-theta.*x) .* besseli(lambda-1,bet.*sqrt(x));

return

Contact us