Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

trunpar3_pdf(x, a, ups, L, U)
% trunpar3_pdf.m - evaluates a doubly Truncated Pareto Probability Denisity.
%   See "Some Recurrence Relations Between Product Monments of Order Statistics of a Doubly Truncated Pareto Distribution",  
%   http://sankhya.isical.ac.in/search/57b1/57b1001.pdf.
%
%  Created by Jim Huntley,  01/12/10
%

function [pdf] = trunpar3_pdf(x, a, ups, L, U)

%persistent coef P Q

%if(isempty(coef))
    P = 1 - (ups/U)^a;
    Q = 1 - (ups/L)^a;
    coef = a*ups^a / (P-Q);
%end

pdf = coef ./ x.^(a+1);

return





    

Contact us