How to use the beta distribution calculator
- Enter the two shape parameters, alpha and beta. Both must be positive.
- Choose Probability at a value to find the area below a value between 0 and 1, Value for probability to find a percentile, or Central interval to find the range holding a share of the distribution.
- Fill in the value, the probability or the interval level that your choice asks for.
- Read the result together with the mean, standard deviation, mode and density that the page shows.
Formula
Density: f(x) = x^(a-1) x (1-x)^(b-1) / B(a, b), for x between 0 and 1
Probability below x: I(x; a, b), the regularized incomplete beta function
Mean = a / (a + b), and mode = (a - 1) / (a + b - 2) when a and b are both above 1
Variance = a x b / ((a + b)^2 x (a + b + 1))
The beta function B(a, b) is the normalizing constant that makes the density add up to 1. The page finds a percentile by solving the cumulative probability for x.
A Beta(2, 5) distribution at 0.5
With alpha 2 and beta 5, the probability below 0.5 is 0.890625, so 0.109375 is above it. The density at 0.5 is 0.9375. The mean is 2 / 7 = 0.28571429, the standard deviation is 0.15971914 and the mode is (2 - 1) / (2 + 5 - 2) = 0.2.
For Beta(3, 9) the central 95 percent interval runs from 0.0602177 to 0.517756, a width of 0.45753812, with a mean of 0.25 and a mode of 0.2. A Beta(1, 1) distribution is flat, so its probability below 0.3 is exactly 0.3.
What the shapes mean
The beta distribution lives on the range from 0 to 1, so it models proportions, rates and probabilities. When both parameters are above 1 it has a single hump, and larger values make it narrower. When one is below 1 the density piles up against an end of the range, and when both are 1 it is flat.
A common use is as a prior for a success rate. The beta-binomial posterior calculator updates such a prior with counts, and the binomial probability calculator works with the counts themselves.
Central intervals and percentiles
A central interval leaves equal probability in each tail. A 95 percent interval therefore runs from the 2.5th to the 97.5th percentile. If you want an interval of the highest density instead, note that it is narrower for skewed shapes, and this page does not compute it.
The confidence interval calculator covers intervals for means and proportions from sample data, which is a different idea from an interval of a distribution you have chosen.
Assumptions and limits
- Both shape parameters must be positive. Very large values are accepted but make the distribution extremely narrow.
- Values and percentiles are between 0 and 1.
- The mode is shown only when both shapes are above 1. Otherwise the density peaks at an end or the mode is not unique.
- The page evaluates the exact distribution, not a normal approximation.
Frequently asked questions
What is a beta distribution used for?
It describes uncertainty about a proportion between 0 and 1, such as a conversion rate, a defect rate or the share of a task completed. It is also the usual prior for a success probability.
How do I find the 90th percentile?
Choose Value for probability, enter the shapes and a probability of 0.9. The result is the value with 90 percent of the distribution below it.
Why is there no mode for some shapes?
If either shape is 1 or less the density does not have an interior peak. It is highest at an end of the range, or it is flat.
Is Beta(1, 1) the same as a uniform distribution?
Yes. Its density is 1 everywhere on the range from 0 to 1, so every probability below a value equals the value.