Lably
Skip to content

Beta distribution

Probability distribution

  • 94 min read
  • 8 chapters

Related on Lably

Through Statistics, Probability distribution and Random variable

The beta distribution has been applied to model the behavior of random variables limited to intervals of finite length in a wide variety of disciplines. The beta distribution is a suitable model for the random behavior of percentages and proportions.

In Bayesian inference, the beta distribution is the conjugate prior probability distribution for the Bernoulli, binomial, negative binomial, and geometric distributions.

The formulation of the beta distribution discussed here is also known as the beta distribution of the first kind, whereas beta distribution of the second kind is an alternative name for the beta prime distribution. The generalization to multiple variables is called a Dirichlet distribution.

Definitions

Probability density function

The probability density function (PDF) of the beta distribution, for 0≤x≤1 or 0<x<1, and shape parameters α, β>0, is a power function of the variable x and of its reflection (1−x) as follows:

f(x;α,β)=constant⋅xα−1(1−x)β−1=xα−1(1−x)β−1∫01uα−1(1−u)β−1du=Γ(α+β)Γ(α)Γ(β)xα−1(1−x)β−1=1B(α,β)xα−1(1−x)β−1

where Γ(z) is the gamma function. The beta function, B, is a normalization constant to ensure that the total probability is 1. In the above equations x is a realization—an observed value that actually occurred—of a random variable X.

Several authors, including N. L. Johnson and S. Kotz, use the symbols p and q (instead of α and β) for the shape parameters of the beta distribution, reminiscent of the symbols traditionally used for the parameters of the Bernoulli distribution, because the beta distribution approaches the Bernoulli distribution in the limit when both shape parameters α and β approach zero.

In the following, a random variable X beta-distributed with parameters α and β will be denoted by:

X∼Beta⁡(α,β)

Other notations for beta-distributed random variables used in the statistical literature are X∼Be(α,β) and X∼βα,β.

Cumulative distribution function

The cumulative distribution function is

F(x;α,β)=B(x;α,β)B(α,β)=Ix(α,β)

where B(x;α,β) is the incomplete beta function and Ix(α,β) is the regularized incomplete beta function.

For positive integers α and β, the cumulative distribution function of a beta distribution can be expressed in terms of the cumulative distribution function of a binomial distribution with

Fbeta(x;α,β)=Fbinomial(β−1;α+β−1,1−x).

Alternative parameterizations

Two parameters

Mean and sample size

The beta distribution may also be reparameterized in terms of its mean μ (0 < μ < 1) and the sum of the two shape parameters ν = α + β > 0( p. 83). Denoting by αPosterior and βPosterior the shape parameters of the posterior beta distribution resulting from applying Bayes' theorem to a binomial likelihood function and a prior probability, the interpretation of the addition of both shape parameters to be sample size = ν = α·Posterior + β·Posterior is only correct for the Haldane prior probability Beta(0,0). Specifically, for the Bayes (uniform) prior Beta(1,1) the correct interpretation would be sample size = α·Posterior + β Posterior − 2, or ν = (sample size) + 2. For sample size much larger than 2, the difference between these two priors becomes negligible. (See section Bayesian inference for further details.) ν = α + β is referred to as the "sample size" of a beta distribution, but one should remember that it is, strictly speaking, the "sample size" of a binomial likelihood function only when using a Haldane Beta(0,0) prior in Bayes' theorem.

This parametrization may be useful in Bayesian parameter estimation. For example, one may administer a test to a number of individuals. If it is assumed that each person's score (0 ≤ θ ≤ 1) is drawn from a population-level beta distribution, then an important statistic is the mean of this population-level distribution. The mean and sample size parameters are related to the shape parameters α and β via

α = μν, β = (1 − μ)ν

Under this parametrization, one may place an uninformative prior probability over the mean, and a vague prior probability (such as an exponential or gamma distribution) over the positive reals for the sample size, if they are independent, and prior data and/or beliefs justify it.

Mode and concentration

Concave beta distributions, which have α,β>1, can be parametrized in terms of mode and "concentration". The mode, ω=α−1α+β−2, and concentration, κ=α+β, can be used to define the usual shape parameters as follows: α=ω(κ−2)+1β=(1−ω)(κ−2)+1 For the mode, 0<ω<1, to be well-defined, we need α,β>1, or equivalently κ>2. If instead we define the concentration as c=α+β−2, the condition simplifies to c>0 and the beta density at α=1+cω and β=1+c(1−ω) can be written as: f(x;ω,c)=xcω(1−x)c(1−ω)B(1+cω,1+c(1−ω)) where c directly scales the sufficient statistics, log⁡(x) and log⁡(1−x). Note also that in the limit, c→0, the distribution becomes flat.

Mean and variance

Solving the system of (coupled) equations given in the above sections as the equations for the mean and the variance of the beta distribution in terms of the original parameters α and β, one can express the α and β parameters in terms of the mean (μ) and the variance (var):

ν=α+β=μ(1−μ)var−1, where ν=(α+β)>0, therefore: var<μ(1−μ)α=μν=μ(μ(1−μ)var−1), if var<μ(1−μ)β=(1−μ)ν=(1−μ)(μ(1−μ)var−1), if var<μ(1−μ).

This parametrization of the beta distribution may lead to a more intuitive understanding than the one based on the original parameters α and β. For example, by expressing the mode, skewness, excess kurtosis and differential entropy in terms of the mean and the variance:

Four parameters

A beta distribution with the two shape parameters α and β is supported on the range [0,1] or (0,1). It is possible to alter the location and scale of the distribution by introducing two further parameters representing the minimum, a, and maximum c (c > a), values of the distribution, by a linear transformation substituting the non-dimensional variable x in terms of the new variable y (with support [a,c] or (a,c)) and the parameters a and c:

y=x(c−a)+a, therefore x=y−ac−a.

The probability density function of the four parameter beta distribution is equal to the two parameter distribution, scaled by the range (c − a), (so that the total area under the density curve equals a probability of one), and with the "y" variable shifted and scaled as follows: f(y;α,β,a,c)=f(x;α,β)c−a=(y−ac−a)α−1(c−yc−a)β−1(c−a)B(α,β)=(y−a)α−1(c−y)β−1(c−a)α+β−1B(α,β).

That a random variable Y is beta-distributed with four parameters α, β, a, and c will be denoted by:

Y∼Beta⁡(α,β,a,c).

Some measures of central location are scaled (by (c − a)) and shifted (by a), as follows:

μY=μX(c−a)+a=αα+β(c−a)+a=αc+βaα+β

mode(Y)=mode(X)(c−a)+a=α−1α+β−2(c−a)+a=(α−1)c+(β−1)aα+β−2, if α,β>1

median(Y)=median(X)(c−a)+a=I12[−1](α,β)(c−a)+a

Note: the geometric mean and harmonic mean cannot be transformed by a linear transformation in the way that the mean, median and mode can.

The shape parameters of Y can be written in term of its mean and variance as

α=(a−μY)(ac−aμY−cμY+μY2+σY2)σY2(c−a)β=−(c−μY)(ac−aμY−cμY+μY2+σY2)σY2(c−a)

The statistical dispersion measures are scaled (they do not need to be shifted because they are already centered on the mean) by the range (c − a), linearly for the mean deviation and nonlinearly for the variance:

(mean deviation around mean)(Y)=((mean deviation around mean)(X))(c−a)=2ααββB(α,β)(α+β)α+β+1(c−a) var(Y)=var(X)(c−a)2=αβ(c−a)2(α+β)2(α+β+1).

Since the skewness and excess kurtosis are non-dimensional quantities (as moments centered on the mean and normalized by the standard deviation), they are independent of the parameters a and c, and therefore equal to the expressions given above in terms of X (with support [0,1] or (0,1)):

skewness(Y)=skewness(X)=2(β−α)α+β+1(α+β+2)αβ.

kurtosis excess(Y)=kurtosis excess(X)=6[(α−β)2(α+β+1)−αβ(α+β+2)]αβ(α+β+2)(α+β+3)

Sign in to keep reading

7 more chapters are free with a Lably account.

More in Statistics and probability