Beta Distribution Calculator
Test cases replayed : 4 of 4 match · Methodology · No outside source listed
Enter the two shape parameters and a value between 0 and 1.
Result
Cumulative probability P(X ≤ x)
Density f(x)
- Mean α ÷ (α + β)
- Variance
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Shape parameter α: enter 0 or more.
- Shape parameter β: enter 0 or more.
- Value x (0 to 1): enter a number from 0 to 1.
- Read the result: Cumulative probability P(X ≤ x); the panel also shows Density f(x), Mean α ÷ (α + β) and Variance.
How this calculator works
Density f(x) = x^(α − 1) (1 − x)^(β − 1) ÷ B(α, β) for 0 < x < 1, where B(α, β) = Γ(α) Γ(β) ÷ Γ(α + β) is the beta function.
The cumulative probability is the regularized incomplete beta function I(x; α, β), evaluated with the Numerical Recipes continued fraction. Mean = α ÷ (α + β); variance = α β ÷ ((α + β)² (α + β + 1)).
The formula
| Symbol | Meaning |
|---|---|
| Shape parameter α | |
| Shape parameter β | |
| Value x (0 to 1) | |
| Cumulative probability P(X ≤ x) | |
fcdf(x, a, b) | the probability that an F variable with a and b degrees of freedom is at most x. |
Worked example
| Shape parameter α | 2 |
|---|---|
| Shape parameter β | 5 |
| Value x (0 to 1) | 0.3 |
| Density f(x) | 2.1609 |
|---|---|
| Mean α ÷ (α + β) | 0.2857 |
| Variance | 0.0255 |
Cumulative probability P(X ≤ x) 0.5798
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What is the beta distribution used for?
Modeling a proportion or probability, such as a conversion rate; in Bayesian statistics it is the usual prior for a binomial probability.
What does Beta(1, 1) look like?
It is the uniform distribution on 0 to 1: the density is 1 everywhere and P(X ≤ x) = x.