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

lagkatz2_pdf(n, bet, b)
% lagkatz2_pdf.m - evaluates a Lagrangian Katz 2 Probability Density.
%   See "On the Moments of LKD", Iranian J. of Sci. & Tech., Trans. A,
%   Vol. 29, 2005.
%
%  Created by Jim Huntley,  6/26/07
%

function [pdf] = lagkatz2_pdf(n, bet, b)

%persistent logbet logomb

%if(isempty(logbet))
    logbet = log(bet);
    logomb = log(1-bet);
%end

pdf = exp(log(binomial_coef(b*n/bet+n,n-1)+eps) + (n-1)*logbet + ...
      (1+b*n/bet)*logomb - log(n));                  % Katz 2; Bazargan-Lari (4)    
return

Contact us