Skip to content
Statistics

Beta Distribution Calculator

Enter the two shape parameters (alpha and beta) and a value x to compute the probability density, cumulative probability P(X less than or equal to x), tail probability, and range probability for the Beta distribution. The results panel also shows the mean, variance, standard deviation, mode, median, and skewness. All computations run in your browser and update as you type.

Your details

First shape parameter. Must be positive. Values above 1 pull the distribution away from 0; values below 1 create a J-shape toward 0.
Second shape parameter. Must be positive. Values above 1 pull the distribution away from 1; values below 1 create a J-shape toward 1.
Choose the type of probability to compute. Cumulative is the standard CDF; upper tail is 1 minus the CDF; range computes the probability between two bounds.
The point at which to evaluate the PDF and CDF. Must be between 0 and 1.
ProbabilityUnimodal, right-skewed (peak near 0)
0.579825

The selected probability (CDF, tail, or range)

PDF f(x)2.1609
Mean0.285714
Variance0.0255102
Standard deviation0.159719
Mode0.2000
Median (approx.)0.263158
Skewness0.596285
ShapeUnimodal, right-skewed (peak near 0)
0.57982565.5% below · x (0 to 1)
01.232.46011
x
f(x) / F(x)
xPDF f(x)CDF F(x)
00.030
0.010.290
0.020.550.01
0.030.80.01
0.041.020.02
0.051.220.03
0.061.410.05
0.071.570.06
0.081.720.08
0.091.850.1
0.11.970.11
0.112.070.13
0.122.160.16
0.132.230.18
0.142.30.2
0.152.350.22
0.162.390.25
0.172.420.27
0.182.440.3
0.192.450.32
0.22.460.34
0.212.450.37
0.222.440.39
0.232.430.42
0.242.40.44
0.252.370.47
0.262.340.49
0.272.30.51
0.282.260.54
0.292.210.56
0.32.160.58
0.312.110.6
0.322.050.62
0.331.990.64
0.341.940.66
0.351.870.68
0.361.810.7
0.371.750.72
0.381.680.73
0.391.620.75
0.41.560.77
0.411.490.78
0.421.430.8
0.431.360.81
0.441.30.82
0.451.240.84
0.461.170.85
0.471.110.86
0.481.050.87
0.490.990.88
0.50.940.89
0.510.880.9
0.520.830.91
0.530.780.92
0.540.730.92
0.550.680.93
0.560.630.94
0.570.580.94
0.580.540.95
0.590.50.95
0.60.460.96
0.610.420.96
0.620.390.97
0.630.350.97
0.640.320.97
0.650.290.98
0.660.260.98
0.670.240.98
0.680.210.99
0.690.190.99
0.70.170.99
0.710.150.99
0.720.130.99
0.730.120.99
0.740.10.99
0.750.091
0.760.081
0.770.061
0.780.051
0.790.051
0.80.041
0.810.031
0.820.031
0.830.021
0.840.021
0.850.011
0.860.011
0.870.011
0.880.011
0.8901
0.901
0.9101
0.9201
0.9301
0.9401
0.9501
0.9601
0.9701
0.9801
0.9901
101
  • PDF f(x)
  • CDF F(x)

Beta(2, 5) - Unimodal, right-skewed (peak near 0)

  • The mean is 0.2857, so the distribution is centred around 28.6% of the [0, 1] range.
  • The standard deviation is 0.1597, giving a coefficient of variation of 55.9%.
  • The distribution is right-skewed (skewness = 0.596).
  • The computed probability for x at or below 0.3 is 57.983%.

Next stepBeta is greater than alpha, so values near 0 are more probable. This is consistent with a prior that expects success rates below 50%.

Formula

f(x;α,β)=xα1(1x)β1B(α,β),B(α,β)=Γ(α)Γ(β)Γ(α+β),μ=αα+β,σ2=αβ(α+β)2(α+β+1)f(x; \alpha, \beta) = \dfrac{x^{\alpha-1}(1-x)^{\beta-1}}{\mathrm{B}(\alpha,\beta)}, \quad \mathrm{B}(\alpha,\beta) = \dfrac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha+\beta)}, \quad \mu = \dfrac{\alpha}{\alpha+\beta}, \quad \sigma^2 = \dfrac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)}

Worked example

For Beta(2, 5): mean = 2/(2+5) = 0.2857; variance = (2*5)/[(7^2)*(8)] = 10/392 = 0.02551; mode = (2-1)/(2+5-2) = 1/5 = 0.2. At x = 0.3: PDF = 0.3^1 * 0.7^4 / B(2,5) = 0.3 * 0.2401 / 0.03333 = 2.161. CDF P(X <= 0.3) = I_0.3(2,5) = 0.4718.

What is the Beta distribution?

The Beta distribution is a continuous probability distribution defined on the interval [0, 1]. It is parameterised by two positive shape parameters, conventionally written alpha and beta (or sometimes a and b). Because its support is the unit interval, it is the natural choice for modelling probabilities, proportions, and rates. The shape of the distribution is extremely flexible: depending on the values of alpha and beta, it can be uniform, bell-shaped, U-shaped, J-shaped, or skewed in either direction. When both parameters equal 1, the Beta distribution reduces to a standard uniform distribution. When both exceed 1, it produces a unimodal (single-peak) shape. When both are below 1, a U-shape appears with probability mass concentrated near 0 and 1.

The PDF, CDF, and key statistics

The probability density function (PDF) is f(x) = x^(alpha-1) * (1-x)^(beta-1) / B(alpha, beta), where B(alpha, beta) is the beta function, equal to Gamma(alpha)*Gamma(beta)/Gamma(alpha+beta). The cumulative distribution function (CDF) at a point x is the regularised incomplete beta function I_x(alpha, beta), which gives the probability P(X less than or equal to x). The mean is alpha/(alpha+beta), and the variance is alpha*beta / [(alpha+beta)^2 * (alpha+beta+1)]. The mode, when both parameters exceed 1, is (alpha-1)/(alpha+beta-2). Skewness equals 2*(beta-alpha)*sqrt(alpha+beta+1) / [(alpha+beta+2)*sqrt(alpha*beta)], and is negative when alpha exceeds beta (left-skewed) and positive when beta exceeds alpha (right-skewed).

Bayesian inference and the conjugate prior

The Beta distribution is the conjugate prior for the Bernoulli and Binomial likelihoods, making it the cornerstone of Bayesian A/B testing, conversion rate estimation, and click-through rate modelling. When you start with a Beta(alpha, beta) prior on a proportion p and observe k successes in n trials, the posterior is Beta(alpha + k, beta + n - k). This closed-form update makes the Beta distribution far more tractable than non-conjugate priors. Common starting priors include the uniform Beta(1, 1), which assigns equal probability to all rates; the Jeffreys prior Beta(0.5, 0.5), which is considered non-informative in the information-theoretic sense; and weakly informative priors such as Beta(2, 2) when you expect rates near 0.5.

Real-world applications

In A/B testing, the Beta distribution models the conversion rate of each variant: after seeing conversions and non-conversions, you update the posterior and compare the two distributions to estimate which variant is better and how confident you can be. In quality control, it models the proportion of defective items in a production batch. In project management and risk analysis (PERT), the Beta distribution approximates task duration distributions between a minimum and maximum, enabling more realistic schedule estimates than the triangular distribution. In Bayesian inference for sports analytics, it tracks a player's long-run batting average or free-throw rate as data accumulate. In machine learning, Beta priors regularise models that estimate probabilities, preventing them from assigning 0 or 1 probability to unseen events.

Common Beta distribution shapes by parameter values

alphabetaShapeTypical use
11Uniform (flat)Uninformative prior
0.50.5U-shaped (Jeffreys prior)Bayesian A/B testing (non-informative)
22Symmetric bellModerate prior centred at 0.5
25Right-skewed unimodalPrior expecting ~29% success rate
52Left-skewed unimodalPrior expecting ~71% success rate
55Symmetric bell (narrower)Stronger prior centred at 0.5
0.51J-shape decreasingStrong prior toward 0
10.5J-shape increasingStrong prior toward 1

The shape of Beta(alpha, beta) changes dramatically with the parameter values. This table summarises the most useful cases.

Frequently asked questions

What do the alpha and beta parameters control?

Alpha and beta are both shape parameters that together determine the form of the distribution. Alpha controls the weight near 1: larger alpha values shift the bulk of the distribution toward the right. Beta controls the weight near 0: larger beta values shift the bulk toward the left. When both equal 1 the distribution is uniform. When both are greater than 1, a single peak (unimodal bell shape) appears. When both are less than 1, the distribution is U-shaped with mass at the extremes. The ratio alpha/(alpha+beta) always gives the mean, so you can choose alpha and beta to target a specific expected value while controlling how spread-out the distribution is.

What is the regularised incomplete beta function?

The CDF of the Beta distribution at a point x is the regularised incomplete beta function I_x(alpha, beta), which equals the integral from 0 to x of the Beta PDF. It cannot be expressed in closed form for general parameters, so this calculator uses the continued-fraction algorithm from Numerical Recipes (Press et al.), which converges rapidly and is accurate to at least six decimal places for all positive parameter values.

Why is the Beta distribution used as a prior in Bayesian statistics?

A prior is called conjugate for a given likelihood when the posterior belongs to the same family as the prior. For data following a Bernoulli or Binomial distribution, if the prior on the success probability is Beta(alpha, beta), then after observing k successes in n trials the posterior is Beta(alpha+k, beta+n-k). This means updating the prior is just adding the observed successes to alpha and the failures to beta, avoiding numerical integration entirely. The Beta distribution is therefore both mathematically convenient and interpretable: the prior parameters alpha and beta can be thought of as "pseudo-observations" of successes and failures before any data are collected.

When does the Beta distribution have no mode?

The mode formula (alpha-1)/(alpha+beta-2) is only defined and meaningful when both alpha and beta are strictly greater than 1. When alpha equals 1 and beta equals 1 (the uniform case), every point is equally likely, so the mode is not unique. When either parameter is less than or equal to 1, the PDF is monotone or U-shaped rather than unimodal, so the conventional single-point mode does not apply. This calculator labels these cases explicitly rather than returning a misleading number.

How do I use this calculator for an A/B test?

Set alpha = 1 + number of conversions and beta = 1 + number of non-conversions for each variant (starting from a uniform Beta(1,1) prior). Use "P(X >= x)" to compute the probability that the success rate exceeds a target threshold, or compare the two posterior distributions directly to estimate the probability that one variant outperforms the other. For example, if variant A has 30 conversions from 100 visitors, use Beta(31, 71). If it also needs to beat a 25% baseline, compute P(X >= 0.25) for Beta(31, 71).

Sources

Written by Dr. Hannah Brandt, PhD Statistician · Munich, Germany

Applied statistician translating rigorous probability theory into clear, accurate tools for researchers and practitioners.

Search 3,500+ calculators

Loading search…