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

stsd2_pdf(x, k)
% stsd2_pdf.m - evaluatess a Sort-Tail Symmetric II Probaility Density.
%   See "Robust Estimation and Hypothesis Testing Under Short-Tailedness And Inliers",
%   A.D. Akkaya and M.L. Tiku, Sociedad de Estadistica e Investigacion Operativa Test 
%   2005, Vol. 14, No. 1, pp.129-150.
%
%  Created by Jim Huntley,  12/06/07
%

function [pdf] = stsd2_pdf(x, k)

%persistent coef

%if(isempty(coef))
    coef = k * 2^(k-1);
%end

for jx = 1:size(x,2)
    if(x(jx) < 0.5)
        pdf(jx) = coef * x(jx)^(k-1);
    elseif(x(jx) >= 0.5)
        pdf(jx) = coef * (1-x(jx))^(k-1);
    end
end

return

Contact us