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_cdf(x, b, g)
% mbbefd_cdf.m - evaluates a Maxwell-Boltzman Bose-Einstein Fermi-Dirac Cumulative Distribution.
%   See "Quantitative Methods in Reinsurance", P. Antal, 06/25/2001
%
%  Created by Jim Huntley,  07/18/06
%
%

function [cdf] = mbbefd_cdf(x, b, g)

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

Contact us