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

delotter_pdf(n, p, nn)
% delotter_pdf.m - evaluatess a Delta Otter (Random Walk) Probability Density.
%   See "Lagrangian Probability Distributions", P.C. Consul & F. Famoye,
%   Birkhauser, 2006, Table 2.2.
%
%   Doesn't normalize for p <~ 0.5 !!!
%
%  Created by Jim Huntley,  11/13/08
%

function [pdf] = delotter_pdf(n, p, nn)

q = 1 - p;
pdf = nn * (binomial_coef(n,(n-nn)/2) * p^nn * (p*q)^((n-nn)/2)) / n;

end

Contact us