Understanding the beta distribution calculator — concept and principle
This calculator gives the cumulative probability, the density and the summary statistics of a beta distribution, the standard model for a quantity between 0 and 1 such as a proportion, a success rate or a probability. Use it in Bayesian statistics, project estimates (PERT) and reliability work.
How it is calculated
Density f(x) = x^(α−1) (1 − x)^(β−1) ÷ B(α, β), for 0 ≤ x ≤ 1
B(α, β) = Γ(α) Γ(β) ÷ Γ(α + β)
P(X ≤ x) = Iₓ(α, β), the regularized incomplete beta function
Mean = α ÷ (α + β); variance = αβ ÷ [(α + β)² (α + β + 1)]
Mode = (α − 1) ÷ (α + β − 2) when α, β > 1
Skewness = 2(β − α) √(α + β + 1) ÷ [(α + β + 2) √(αβ)]
- The median has no closed form and is found numerically from Iₓ(α, β) = 0.5.
The principle
The two shape parameters act like counts of successes and failures: α pulls the mass toward 1 and β toward 0. In Bayesian updating, a beta prior combined with binomial data gives another beta distribution, with α increased by the successes and β by the failures. α = β = 1 is the uniform distribution; α = β > 1 is symmetric around 0.5; and larger α + β makes the distribution narrower, like having more data.
Worked example
Default inputs: α = 2, β = 5, x = 0.3.
- B(2, 5) = 1! × 4! ÷ 6! = 1/30, so f(0.3) = 30 × 0.3 × 0.7⁴ = 2.1609.
- For whole-number parameters, P(X ≤ 0.3) = P(at least 2 successes in 6 trials with p = 0.3) = 1 − 0.7⁶ − 6 × 0.3 × 0.7⁵ = 0.579825; P(X > 0.3) = 0.420175.
- Mean = 2 ÷ 7 = 0.285714; mode = 1 ÷ 5 = 0.2; median = 0.26445.
- Variance = 10 ÷ (49 × 8) = 0.0255102; standard deviation = 0.159719.
- Skewness = 2 × 3 × √8 ÷ (9 × √10) = 0.596285.
| x (between 0 and 1) | P(X ≤ x) |
|---|---|
| 0.075 | 0.0688678 |
| 0.15 | 0.223516 |
| 0.225 | 0.405889 |
| 0.3 | 0.579825 |
| 0.375 | 0.725819 |
| 0.45 | 0.836433 |
| 0.6 | 0.95904 |
How to read the result
Here the distribution is skewed right: most mass sits around 0.2–0.3 with a tail toward higher values, so mode < median < mean. A density above 1 is normal for continuous distributions on a short interval; only the area under the curve must equal 1.
Common mistakes
- Reading the density as a probability.
- Swapping α and β, which mirrors the distribution around 0.5.
- Expecting a mode when α or β is 1 or less; the peak is then at an end.
- Using x outside 0–1.
Frequently asked questions
What is the beta distribution used for?
Modelling proportions and probabilities, especially as a prior in Bayesian statistics.
What does Beta(1, 1) look like?
It is the uniform distribution on 0 to 1.
How do I update a beta prior?
Add the number of successes to α and the number of failures to β.
Sources: NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.6.6.17 Beta Distribution