Beta Distribution Calculator

Model probabilities and proportions.

Examples:
P(X ≤ x)
0.579825
Mean
0.285714
Mode
0.2
Std Deviation
0.159719
0.00.10.10.10.20.30.30.30.40.50.50.60.60.70.70.80.80.80.90.91.000.250.50.751

Common Uses

  • Bayesian prior for probabilities/proportions
  • Modeling bounded random variables [0, 1]
  • Project completion estimates (PERT)
  • Conjugate prior for binomial likelihood
Beta Distribution PDF
f(x;α,β)=xα−1(1−x)β−1B(α,β)f(x; \alpha, \beta) = \frac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha, \beta)}

What Is the Beta Distribution?

The beta distribution is a continuous probability distribution defined on the interval [0, 1], making it ideal for modeling probabilities, proportions, and percentages. With two shape parameters (α\alpha and β\beta), it can take on a remarkable variety of shapes—from uniform to U-shaped to highly skewed—making it one of the most flexible distributions in statistics.

The beta distribution is central to Bayesian statistics, where it serves as the conjugate prior for binomial proportions.

The Distribution

Probability Density Function (PDF)

f(x;α,β)=xα−1(1−x)β−1B(α,β)f(x; \alpha, \beta) = \frac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha, \beta)}

Where B(α,β)B(\alpha, \beta) is the beta function:

B(α,β)=Γ(α)Γ(β)Γ(α+β)B(\alpha, \beta) = \frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha + \beta)}

Key Statistics

  • Mean: μ=αα+β\mu = \frac{\alpha}{\alpha + \beta}
  • Variance: σ2=αβ(α+β)2(α+β+1)\sigma^2 = \frac{\alpha\beta}{(\alpha + \beta)^2(\alpha + \beta + 1)}
  • Mode (when α,β>1\alpha, \beta > 1): α−1α+β−2\frac{\alpha - 1}{\alpha + \beta - 2}

Shape Parameter Effects

The parameters α\alpha and β\beta control the distribution's shape:

ParametersShape
α=β=1\alpha = \beta = 1Uniform (flat)
α=β>1\alpha = \beta > 1Symmetric, bell-shaped
α=β<1\alpha = \beta < 1U-shaped
α>β\alpha > \betaSkewed left (toward 1)
α<β\alpha < \betaSkewed right (toward 0)
α,β\alpha, \beta largeConcentrated, low variance

Practical Applications

Bayesian Inference for Proportions

The beta distribution is the conjugate prior for the binomial distribution. If your prior for a probability pp is Beta(α,β)Beta(\alpha, \beta), and you observe ss successes in nn trials, your posterior is:

p∣data∼Beta(α+s,β+n−s)p \mid data \sim Beta(\alpha + s, \beta + n - s)

This elegant updating makes beta-binomial models computationally simple and interpretable.

A/B Testing

In Bayesian A/B testing, conversion rates are modeled with beta distributions. The probability that variant A beats variant B can be computed directly from their posterior beta distributions.

Project Management (PERT)

The Program Evaluation and Review Technique (PERT) uses beta distributions to model task duration uncertainty given optimistic, most likely, and pessimistic estimates.

Machine Learning

Beta distributions appear in:

  • Topic modeling (Latent Dirichlet Allocation uses Dirichlet, a multivariate beta)
  • Bayesian neural networks
  • Thompson sampling for multi-armed bandits

Sports Analytics

Batting averages, free throw percentages, and other bounded performance metrics are naturally modeled with beta distributions.

Bayesian Interpretation

Think of α\alpha and β\beta as "pseudo-counts":

  • α−1\alpha - 1 = pseudo-successes
  • β−1\beta - 1 = pseudo-failures

A Beta(1,1)Beta(1, 1) prior (uniform) represents complete ignorance. A Beta(10,10)Beta(10, 10) prior represents prior belief centered at 0.5 with moderate confidence.

Example: Starting with Beta(1,1)Beta(1, 1), after observing 7 successes and 3 failures, the posterior is Beta(8,4)Beta(8, 4) with mean 8/12=0.6678/12 = 0.667.

Relationship to Other Distributions

Uniform Distribution

Beta(1,1)Beta(1, 1) is the uniform distribution on [0, 1].

Binomial Connection

If X∼Binomial(n,p)X \sim Binomial(n, p) and p∼Beta(α,β)p \sim Beta(\alpha, \beta), the marginal distribution of XX is beta-binomial.

Order Statistics

The kk-th order statistic from nn uniform [0,1] samples follows Beta(k,n−k+1)Beta(k, n-k+1).

F-Distribution Connection

If X∼Beta(α,β)X \sim Beta(\alpha, \beta), then X1−X⋅βα\frac{X}{1-X} \cdot \frac{\beta}{\alpha} follows an F-distribution.

Estimating Parameters

Given data, estimate α\alpha and β\beta using:

Method of Moments: α^=xˉ(xˉ(1−xˉ)s2−1)\hat{\alpha} = \bar{x}\left(\frac{\bar{x}(1-\bar{x})}{s^2} - 1\right) β^=(1−xˉ)(xˉ(1−xˉ)s2−1)\hat{\beta} = (1-\bar{x})\left(\frac{\bar{x}(1-\bar{x})}{s^2} - 1\right)

Maximum Likelihood: Numerical optimization of the log-likelihood.

Computing Probabilities

The CDF (incomplete beta function) requires numerical methods:

F(x;α,β)=Ix(α,β)=B(x;α,β)B(α,β)F(x; \alpha, \beta) = I_x(\alpha, \beta) = \frac{B(x; \alpha, \beta)}{B(\alpha, \beta)}

Quantiles (inverse CDF) also require numerical inversion.

Related Calculations

Summary

The beta distribution's flexibility and mathematical convenience make it indispensable for modeling probabilities and proportions. Its role as the conjugate prior for binomial data makes it fundamental to Bayesian statistics, enabling elegant analytical solutions for proportion estimation. Whether you're running A/B tests, building probabilistic models, or quantifying uncertainty in bounded quantities, the beta distribution provides a principled and practical framework.