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

mbbefd_pdf(x, b, g)
% mbbefd_pdf.m - evaluates a Maxwell-Boltzman Bose-Einstein Fermi-Dirac Probability Density.
%   See "Quantitative Methods in Reinsurance", P. Antal, 06/25/2001
%
%  Created by Jim Huntley,  07/18/06
%
%

function [pdf] = mbbefd_pdf(x, b, g)

if(x <= 0 || g == 1 || b ==0)
    pdf = 0;
elseif(x >= 1)
    pdf = 0;
elseif(x > 0 && x < 1 && g > 1 && b == 1)
    pdf = (g-1) / (1+(g-1)*x)^2;
elseif(x > 0 && x < 1 && g > 1 && b*g == 1)
    pdf = -b^x * log(b);
else
    pdf = (b-1) * (g-1) * log(b) * b^(1-x) /((g-1)*b^(1-x) + (1-g*b))^2;
end
pdf = pdf * g/(g-1);

return

Contact us