Post Reply 
Distributions
03-04-2015, 02:37 PM
Post: #11
RE: Distributions
Rayleigh distribution

Code:

EXPORT rayleigh(s, t)
// Rayleigh distribution s=σ scale parameter, t>=0 var
// rayleigh(2σ^2) = weibull(σ*sqrt(2),2)
BEGIN
local f;
f:= piecewise(t<0, 0, ((t/(s^2))*e^(-(t^2)/(2*(s^2)))));
return f;
END;

EXPORT rayleigh_cdf(s, t)
BEGIN
local f;
f:= piecewise(t<0, 0, 1 - e^(-t^2/(2*(s^2))));
return f;
END;

Pareto distribution

Code:

EXPORT paretod(xm, a, k)
// Pareto distribution x_m >0 scale, a=α > 0 shape
BEGIN
local f;
IF ((a<=0) OR (xm <= 0) OR (k<xm)) THEN RETURN("Use: xm > 0, a >0, k >= xm"); END;
f:=(a*xm^a)/k^(a+1);
return f;
END;

EXPORT paretod_cdf(xm, a, k)
BEGIN
local f;
IF ((a<=0) OR (xm <= 0) OR (k<xm)) THEN RETURN("Use: xm > 0, a >0, k >= xm"); END;
f:=1-(xm/k)^a;
return f;
END;

EXPORT paretod_bound(a, L, H, k)
// Bounded Pareto distribution
// a=α >0 shape, L>0, H>L location, k var
BEGIN
local f;
IF (a<=0 OR L<=0 OR H<=L) THEN RETURN("Use a>0, L>0, H>L"); END;
f:= (a*L^a*k^(-a-1))/(1-(L/H)^a);
return f;
END;

EXPORT paretod_bnd_cdf(a,L,H,k)
BEGIN
local f;
IF (a<=0 OR L<=0 OR H<=L) THEN RETURN("Use a>0, L>0, H>L"); END;
f:= (1-L^a*k^(-a))/(1-(L/H)^a);
return f;
END;

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Distributions - salvomic - 02-18-2015, 11:10 PM
RE: Distributions - walter b - 02-19-2015, 06:18 AM
RE: Distributions - parisse - 02-19-2015, 07:35 AM
RE: Distributions - salvomic - 02-19-2015, 08:28 AM
RE: Distributions - Offroad - 02-19-2015, 11:58 AM
RE: Distributions - salvomic - 02-19-2015, 12:38 PM
RE: Distributions - salvomic - 02-19-2015, 03:58 PM
RE: Distributions - salvomic - 02-19-2015, 08:27 PM
RE: Distributions - salvomic - 02-22-2015, 06:49 PM
RE: Distributions - salvomic - 03-01-2015, 05:05 PM
RE: Distributions - salvomic - 03-04-2015 02:37 PM
RE: Distributions - salvomic - 04-08-2015, 11:00 AM
RE: Distributions - DrD - 04-08-2015, 01:22 PM
RE: Distributions - salvomic - 04-08-2015, 01:37 PM
RE: Distributions - Claudio L. - 04-08-2015, 10:04 PM
RE: Distributions - salvomic - 04-09-2015, 04:35 AM
RE: Distributions - Gerald H - 04-09-2015, 09:34 AM
RE: Distributions - Paul Dale - 04-08-2015, 09:33 PM
RE: Distributions - debrouxl - 04-09-2015, 05:53 PM



User(s) browsing this thread: 3 Guest(s)