Post Reply 
Statistic Distributions
12-23-2015, 10:18 PM (This post was last modified: 12-23-2015 11:28 PM by salvomic.)
Post: #2
RE: Statistic Distributions
Gumbel (and Standard Gumbel) distribution

Code:

EXPORT gumbel(m,b, k)
// Gumbel distribution m=μ location, b=β>0 scale, k=x var
// also log-Weibull
BEGIN
local f, z;
IF b<=0 THEN RETURN("Use: m, b>0, x"); END;
z:= (k-m)/b;
f:= (1/b)*e^-(z+e^-z);
RETURN f;
END;

EXPORT gumbel_cdf(m,b,k)
BEGIN
local f;
IF b<=0 THEN RETURN("Use: m, b>0, x"); END;
f:= e^-(e^(-(k-m)/b));
END;

EXPORT gumbel_std(k)
// Standard Gumbel distribution 
// (m=μ location, b=β>0 scale, k=x var)
// μ=0 and β=1
BEGIN
local f;
f:= e^-(k+e^-k);
RETURN f;
END;

EXPORT gumbel_std_cdf(k)
BEGIN
local f;
f:= e^-e^(-k);
END;

Fréchet Distribution (also inverse Weibull)
Code:

EXPORT frechet(a,s,m,k)
// Fréchet distribution
// also inverse Weibull
// a=α>0 shape, s>0 scale (default 1)
// m localtion of minimum (default 0)
// k=x var
BEGIN
local f;
IF a<=0 OR s<=0 THEN RETURN("Use: a>0, s>0, m[def 0], x"); END;
f:= (a/s)*((k-m)/s)^(-1-a)*e^(-((k-m)/s)^(-a));
RETURN f;
END;

EXPORT frechet_cdf(a,s,m,k)
BEGIN
local f;
IF a<=0 OR s<=0 THEN RETURN("Use: a>0, s>0, m[def 0], x"); END;
f:= e^(-((k-m)/s)^(-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
Statistic Distributions - salvomic - 05-15-2015, 07:48 PM
RE: Statistic Distributions - salvomic - 12-23-2015 10:18 PM



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