Beta Distribution

The Beta distribution is a family of continuous probability distributions defined on a finite interval, parameterized by two positive shape parameters α and β. It serves as a conjugate prior to the Bernoulli, binomial, and geometric distributions in Bayesian inference and is extensively used to model random variables constrained to a finite interval.

Definition

The Beta distribution is defined for values x where 0 ≤ x ≤ 1, with shape parameters α>0 and β>0. Its probability density function (PDF) is:

f(x)=xα1(1x)β1B(α,β)

where B(α,β) is the Beta function. The cumulative distribution function (CDF) is given by:

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

where B(x;α,β) is the incomplete Beta function.

For the generalized Beta distribution on interval [a,b], where a < b, the PDF becomes:

f(x)=(xa)α1(bx)β1(ba)α+β1B(α,β)

with corresponding CDF:

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

Applications

The Beta distribution finds widespread use across various fields:

  • In Bayesian statistics, it serves as the conjugate prior distribution for binomial proportions, making it essential for parameter estimation and hypothesis testing.

  • Project managers use the Beta distribution in PERT (Program Evaluation and Review Technique) analysis to model task completion times and estimate project durations.

  • Quality control engineers employ the Beta distribution to model proportions and percentages in manufacturing processes and reliability analysis.

  • Risk analysts utilize the Beta distribution to model uncertain probabilities in decision analysis and risk assessment frameworks.

  • In machine learning, the Beta distribution plays a crucial role in Dirichlet processes and mixture models, particularly for Bayesian nonparametric methods.

Properties

The Beta distribution's key statistical properties are given by:

PropertyValue
Meanαα+β
Varianceαβ(α+β)2(α+β+1)
Skewness2(βα)α+β+1(α+β+2)αβ
Excess Kurtosis6(α+β+1)(αβ)2αβ(α+β+2)αβ(α+β+2)(α+β+3)
Modeα1α+β2 for α,β>1
Support[0, 1] (standard) or [a, b] (generalized)
EntropylnB(α,β)(α1)ψ(α)(β1)ψ(β)+(α+β2)ψ(α+β)

where B(α,β) is the Beta function and ψ(x) is the digamma function.

Relationships to Other Distributions

The Beta distribution has several important relationships with other probability distributions and includes several special cases:

The Beta distribution also has important relationships with other distributions:

  • It is the conjugate prior for the Bernoulli, binomial, and geometric distributions in Bayesian inference

  • It is a special case of the Dirichlet distribution with two parameters

  • If X ~ Beta(α, β), then 1-X ~ Beta(β, α)

  • The order statistics of uniform random variables follow Beta distributions

The BetaDistribution Class

The Beta distribution is implemented by the BetaDistribution class. It has three constructors. The first constructor takes the two shape parameters, α and β as arguments. The following constructs a beta distribution with α = 1.5 and β = 0.8:

C#
var beta1 = new BetaDistribution(1.5, 0.8);

The second constructor takes two extra arguments that specify the lower and upper bound of the interval on which the beta distribution is defined. The default is a lower bound of 0 and an upper bound of 1. The following constructs a beta distribution with α = 1.5 and β = 0.8 over the interval [1, 4]:

C#
var beta2 = new BetaDistribution(1.5, 0.8, 1, 4);

If a variable is assumed to have a beta distribution, then the parameters of the distribution can be estimated using the method of matching moments. The third constructor performs this calculation. It takes one argument: a Vector<T> whose distribution is to be estimated. This constructor estimates a standard beta distribution, with lower bound and upper bound equal to 0 and 1, respectively.

Note that parameter estimation says nothing about how well the estimated distribution fits the variable's distribution. Use one of the goodness-of-fit tests to verify the appropriateness of the choice of distribution.

The BetaDistribution class has four specific properties that correspond to the parameters of the distribution. The Alpha and Beta properties return the shape parameters, α and β. The LowerBound and UpperBound properties return the bounds of the interval on which the beta distribution is defined.

BetaDistribution has one static (Shared in Visual Basic) method, Sample, which generates a random sample using a user-supplied uniform random number generator.

C#
var random = new Pcg32();
double sample = BetaDistribution.Sample(random, 1.5, 0.8);

References

For more information on the Beta distribution, refer to the following sources:

  • Johnson, N. L., Kotz, S., & Balakrishnan, N. (1994). "Continuous Univariate Distributions, Volume 2", Chapter 25. Wiley Series in Probability and Statistics.

  • Forbes, C., Evans, M., Hastings, N., & Peacock, B. (2011). "Statistical Distributions", Chapter 4. Wiley Series in Probability and Statistics.

See Also