The beta distribution is a flexible family of distributions for quantities that live between 0 and 1: proportions, probabilities, success rates, percentages of completion. Two positive shape parameters control its form: α pulls mass towards 1 and β towards 0. Beta(1, 1) is the flat uniform distribution, Beta(2, 5) is skewed to the right with a peak at 0.2, equal parameters give a symmetric hump around 0.5, and parameters below 1 create a U shape piled up at both ends.
Its best-known use is in Bayesian statistics: a Beta(α, β) prior for an unknown probability, updated with s successes and f failures, becomes a Beta(α + s, β + f) posterior. It is also used in project management (PERT task durations), for modelling batting averages and click-through rates, and in order statistics of uniform samples.
The cumulative distribution has no simple closed form (it is the regularised incomplete beta function I_x(α, β)), so tables are rarely available. This calculator evaluates it numerically, shades the requested area under the density and inverts it for quantiles.
How to use the Beta Distribution Calculator
- Shape parameter α
- Shape parameter β
- What to calculate
- Value x between 0 and 1 (x₁ for a range)
- Upper value x₂
- Cumulative probability p
- How many random values
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
The density uses the beta function B(α, β) = Γ(α)Γ(β)/Γ(α + β); probabilities come from the regularised incomplete beta function and quantiles from its numerical inverse. Choose what to calculate: a cumulative probability, an upper tail, the probability between or outside two values, a quantile (inverse CDF) or a random sample generated by inverse-transform sampling. The chart shades exactly the area you asked for.
Worked example
For Beta(2, 5): the mean is 2/7 = 0.2857, the median 0.2644, the mode 0.2 and the variance 10/(49 × 8) = 0.02551 (standard deviation 0.1597). P(X ≤ 0.3) = 57.98%, P(0.2 ≤ X ≤ 0.4) = 42.21% and the 90th percentile is 0.5103.
Bayesian update: with a flat Beta(1, 1) prior and 7 successes in 10 trials the posterior is Beta(8, 4). Its mean is 8/12 = 0.667, the probability that the true rate exceeds 0.5 is 88.67%, and the central 95% interval runs from 0.390 to 0.891.
Shapes of the beta distribution
| Parameters | Shape |
|---|---|
| α = β = 1 | Flat, uniform on 0 to 1 |
| α = β > 1 | Symmetric hump around 0.5 |
| α, β < 1 | U-shaped, high at both ends |
| α < β | Skewed right, mass near 0 |
| α > β | Skewed left, mass near 1 |
| α = 1, β = 2 | Straight line falling from 2 to 0 |
Formula
f(x) = x^(α−1) (1 − x)^(β−1) ÷ B(α, β) · F(x) = I_x(α, β) · mean = α/(α + β) · variance = αβ / ((α + β)²(α + β + 1)) · mode = (α − 1)/(α + β − 2)
Worked example
Inputs: Shape parameter α: 2; Shape parameter β: 5; What to calculate: P(X ≤ x) – probability at or below x; Value x between 0 and 1 (x₁ for a range): 0.3.
Results: Result = P(X ≤ 0.3) = 0.579825 (57.9825%); Probability density f(x) = 2.1609; P(X ≤ x) – cumulative (CDF) = 57.9825 %; P(X > x) – survival = 42.0175 %; Mean (expected value) = 0.2857; Median = 0.2644.
Key terms
- Shape parameters (α, β)
- Two positive numbers that set the form of the beta distribution.
- Beta function B(α, β)
- Γ(α)Γ(β)/Γ(α + β), the constant that makes the density integrate to 1.
- Regularised incomplete beta function
- I_x(α, β), the cumulative probability of the beta distribution.
- Conjugate prior
- A prior that gives a posterior of the same family. The beta is conjugate to the binomial.
Frequently asked questions
What is the beta distribution used for?
Modelling proportions and probabilities between 0 and 1, Bayesian priors and posteriors for a success rate, and task durations in PERT planning.
What is the mean of Beta(2, 5)?
α/(α + β) = 2/7 = 0.2857; its mode is (2 − 1)/(2 + 5 − 2) = 0.2.
What is P(X ≤ 0.3) for Beta(2, 5)?
I₀.₃(2, 5) = 0.5798, so about 58% of the distribution lies below 0.3.
Which parameters give a uniform distribution?
α = β = 1. Equal parameters above 1 give a symmetric bell around 0.5; parameters below 1 give a U shape.
How does Bayesian updating work with the beta distribution?
Start from Beta(α, β), observe s successes and f failures, and the posterior is Beta(α + s, β + f). A flat prior with 7 successes in 10 trials gives Beta(8, 4).
Why is there no mode for some parameters?
When α and β are both below 1 the density goes to infinity at 0 and 1, so there is no single peak.
Can x be outside 0 to 1?
No. To model a variable on [a, b], rescale it to (x − a)/(b − a) first.