Beta distribution (from http://www.math.wm.edu/˜ leemis/chart/UDR/UDR.html ) The shorthand X ∼ beta(β,γ) is used to indicate that the random variable X has the beta distribution with parameters beta and gamma. A beta random variable X with positive shape parameters β and γ has probability density function

f(x) = \frac{Γ(β + γ)x^{β−1} (1 − x)^{γ−1}}{Γ(β)Γ(γ)} 0 < x < 1.

The beta distribution is used for modeling random variables that lie between 0 and 1 (for example, percentages or interest rates) and as a prior distribution (for example, the beta–binomial distribution). Probability density functions with various values of the parameters are illustrated below.

PSfrag replacements β = 0.5 γ = 0.5 γ = 1 γ = 2 β = 1 β = 2 The cumulative distribution function on the support of X is

F (x) = P(X ≤ x) = I_{x}(β,γ) 0 < x < 1,

where I_{x} is the regularized incomplete beta function:

I_{x}(a,b) = \frac{B_{x}(a,b)}{B(a,b)},

where the beta function is

B(a,b) = \frac{Γ(a)Γ(b)}{Γ(a + b)}

and the incomplete beta function is

B_{x}(a,b) = ∫_{0}^{x}t^{a−1} (1 − t)^{b−1} dt.

For integer values of a and b, the regularized incomplete beta function can be computed via

I_{x}(a,b) = ∑_{j=a}^{a+b−1} \frac{(a + b − 1)!}{j!(a + b − 1 − j)!} x^{j}(1 − x)^{a+b−1−j} .

The survivor function on the support of X is

S(x) = P(X ≥ x) = 1 − I_{x}(β,γ) 0 < x < 1.

The hazard function on the support of X is

h(x) = \frac{f(x)}{S(x)} = \frac{Γ(β + γ)x^{β−1} (1 − x)^{γ−1}}{(1 − I_{x}(β,γ))Γ(β)Γ(γ)} 0 < x < 1.

The cumulative hazard function and the inverse distribution function are mathematically intractable. The median of X is found by solving

I_{m}(β,γ) = 0.5

for m. The population mean, variance, skewness, and kurtosis of X are

E[X] = \frac{β}{β + γ}

V [X] = \frac{βγ}{(β + γ)^{2}(β + γ + 1)}

E [( \frac{X − μ}{σ} ) ^{3}] = \frac{2(γ − β)\sqrt{1 + β + γ}}{\sqrt{βγ}(β + γ + 2)}

E [( \frac{X − μ}{σ} ) ^{4}] = \frac{3(β^{2}γ + βγ^{2}− 2βγ + 2β^{2}+ 2γ^{2}) (1 + β + γ)}{βγ(β + γ + 2)(β + γ + 3)}

APPL verification: The APPL statements

X := BetaRV(beta, g); CDF(X); SF(X); HF(X); IDF(X); Mean(X); Variance(X); Skewness(X); Kurtosis(X);

verify the cumulative distribution function, survivor function, hazard function, population mean, variance, skewness, and kurtosis. Note the use of g as a parameter instead of gamma due to APPL error.