Beta distribution Created 2026-09-24 Updated 2026-10-14
The beta distribution is an absolutely continuous probability distribution for a random variable between zero and one. It can describe uncertainty about a probability, such as an unknown coin's chance of heads. For any real , its probability density function is
and zero outside . The normalizer is the Euler beta function, related to the Gamma function by the beta--gamma identity:
Thus the probability density function integrates to one. [ref].
The endpoint behavior explains why the restrictions are exactly : near zero the probability density function behaves like a constant times , and near one like a constant times . These improper integrals converge for positive parameters, even when the probability density function diverges at zero for or at one for . There is no probability mass at either endpoint: . A probability density function's height is not a probability; an interval's probability is the area under it.
Some useful examples of the beta distribution are:
Figure 1.
Beta density shapes: uniform, central, asymmetric, and boundary singular
. Details.
The arcsine distribution curve is plotted only for ; its finite plotted ends do not represent finite endpoint values of the probability density function. Using the inverse sine, the shaded central interval has exact probability , calculated analytically rather than by treating the cropped curve as normalized.
To separate location from spread, write and . The mean and variance of the beta distribution are
The mean specifies the balance between the parameters; their sum controls concentration about that mean. Multiplying both parameters by the same positive number preserves the mean and changes the variance. Larger puts more area near and makes the probability density function taller there; the total area stays one. Small allows much greater spread, sometimes favoring the endpoints rather than the mean itself.
For example, keeping mean and taking gives the beta distributions , , and . Their variances are , , and , respectively. Parameters need not be integers.
Figure 2.
The same beta mean with three concentrations and decreasing variance
. Details.
The formulas follow from two short moment calculations. Multiplying the probability density function by or increases the first parameter of the Euler beta function:
Apply the Gamma function recurrence to the beta--gamma identity, then subtract from to obtain the variance.
The beta distribution is especially convenient as a prior distribution for the unknown success probability of Bernoulli trials. The Beta-binomial conjugacy says that successes and failures update a prior distribution to a posterior distribution . For example, suppose a coin has prior distribution and we observe eight heads and two tails. Its posterior distribution is then , with posterior mean . [ref].
Substitute , with , when integrating the target density. Since , its cumulative distribution function is
Inverting gives the arcsine distribution sampler
The inverse transform sampling proof in the root solution shows that it has the required probability density function. Use successive independent uniforms for successive samples. A draw at the endpoint one can be discarded if values strictly inside the support are desired; this event has probability zero under the ideal continuous uniform distribution.