User Rating 0.0
Total Usage 0 times
Presets:
Is this tool helpful?

Your feedback helps us improve.

About

The Beta distribution is defined on the interval [0, 1] and parameterized by two shape parameters α and β. It models proportions, probabilities, and bounded random variables in Bayesian inference, A/B testing, and reliability engineering. Misconfiguring shape parameters leads to incorrect posterior estimates, faulty credible intervals, and flawed hypothesis tests. This calculator uses the Lanczos approximation for the log-gamma function and Lentz’s continued fraction algorithm for the regularized incomplete beta function Ix(α, β), matching reference implementations to 1010 relative accuracy.

The tool computes the full moment profile: mean, variance, standard deviation, skewness, excess kurtosis, and mode (when defined). It also evaluates the PDF f(x), CDF F(x), and inverse CDF (quantile) via Newton-Raphson iteration. Note: the mode is undefined when both α1 and β1 (the U-shaped case). For extreme parameter ratios (α/β > 10000), numerical precision may degrade near boundary values.

beta distribution probability density function CDF statistics calculator Bayesian statistics alpha beta parameters quantile function

Formulas

The probability density function (PDF) of the Beta distribution is:

f(x; α, β) = xα 1 (1 x)β 1B(α, β)

where B(α, β) is the Beta function:

B(α, β) = Γ(α) Γ(β)Γ(α + β)

The cumulative distribution function (CDF) is the regularized incomplete beta function:

F(x; α, β) = Ix(α, β) = B(x; α, β)B(α, β)

Key moments and properties:

Mean: μ = αα + β
Variance: σ2 = α β(α + β)2 (α + β + 1)
Mode: α 1α + β 2 for α > 1, β > 1
Skewness: 2(β α) α + β + 1(α + β + 2) α β
Kurtosis (excess): 6[(α β)2(α + β + 1) αβ(α + β + 2)]αβ(α + β + 2)(α + β + 3)

Where α = first shape parameter (alpha), β = second shape parameter (beta), x = evaluation point in [0, 1], Γ = Gamma function, Ix = regularized incomplete beta function computed via continued fraction expansion.

Reference Data

Shape ProfileαβMeanVarianceModeSkewnessDescription
Uniform110.50000.0833Any0Flat distribution, maximum entropy on [0,1]
Symmetric bell550.50000.02270.50000Symmetric, concentrated at center
Right-skewed250.28570.02550.20000.5963Mass shifted toward 0
Left-skewed520.71430.02550.8000−0.5963Mass shifted toward 1
U-shaped0.50.50.50000.1250Bimodal0Arcsine distribution, mass at boundaries
J-shaped (left)0.510.33330.088900.5657Monotone decreasing
J-shaped (right)10.50.66670.08891−0.5657Monotone increasing
Peaked center10100.50000.01190.50000Tight bell, low variance
Jeffreys prior0.50.50.50000.1250Bimodal0Non-informative Bayesian prior for binomial
Haldane prior0.010.010.50000.2475Bimodal0Improper prior, extreme boundary mass
Bayesian posterior (weak)220.50000.05000.50000After 1 success, 1 failure with uniform prior
A/B test (100 vs 90)1019010.10080.00010.10000.0794Conversion rate posterior after 1000 trials
Strong left evidence1100.09090.006901.0646Heavy right skew, near-zero proportion
Strong right evidence1010.90910.00691−1.0646Heavy left skew, near-one proportion
Exponential-like150.16670.019800.8528Monotone decreasing from boundary
High concentration50500.50000.00250.50000Very tight, quasi-normal
Power law0.320.13040.034301.5811Heavy-tailed toward zero
Quasi-Bernoulli0.10.10.50000.2083Bimodal0Almost all mass at 0 and 1

Frequently Asked Questions

When both α and β exceed 1, the distribution is unimodal with a bell shape. When both are less than 1, it becomes U-shaped (bimodal at the boundaries). If α < 1 and β ≥ 1, the density is J-shaped with infinite density at x = 0. The ratio α/β controls skewness: α > β shifts mass toward 1, while α < β shifts mass toward 0. Equal values (α = β) produce symmetric distributions centered at 0.5.
The mode formula (α − 1)/(α + β − 2) is only valid when both α > 1 and β > 1. When α = β = 1 (uniform distribution), every point is equally likely. When α < 1 or β < 1, the density diverges at the boundaries (0 or 1), making the mode a boundary value rather than an interior maximum. For α ≤ 1 and β ≤ 1 simultaneously, the distribution is U-shaped with two boundary modes.
The calculator uses Lentz's modified continued fraction algorithm applied to the regularized incomplete beta function I_x(α, β). For values where x > (α + 1)/(α + β + 2), it applies the symmetry relation I_x(α, β) = 1 − I_{1−x}(β, α) to ensure the continued fraction converges rapidly. The log-gamma function uses the Lanczos approximation with g = 7 and standard coefficients, providing at least 10 significant digits of accuracy.
The quantile function uses Newton-Raphson iteration. Given a target probability p, it finds x such that I_x(α, β) = p. The initial guess uses a rational approximation based on the normal quantile transformed through the Wilson-Hilferty cube root approximation. Each iteration updates x by subtracting (CDF(x) − p) / PDF(x), with bounds clamping to [0, 1]. Convergence typically occurs within 10-15 iterations to machine precision.
Yes. All computations use log-space arithmetic (log-gamma, log-PDF) to avoid overflow. The Beta function B(α, β) for large parameters would underflow in direct computation, but ln B(α, β) = ln Γ(α) + ln Γ(β) − ln Γ(α + β) remains numerically stable. The distribution plot adapts its x-axis range to focus on the region where the density is non-negligible, which for large equal parameters is a narrow band around 0.5.
In Bayesian analysis with a binomial likelihood, the Beta distribution is the conjugate prior. Starting with a prior Beta(α₀, β₀), after observing s successes and f failures, the posterior is Beta(α₀ + s, β₀ + f). For A/B testing, each variant's conversion rate is modeled as a Beta posterior. The probability that variant A beats variant B is computed by comparing their posterior distributions. Common non-informative priors include the uniform Beta(1, 1), the Jeffreys prior Beta(0.5, 0.5), and the Haldane prior Beta(ε, ε) where ε → 0.
Beta(1, 1) is the continuous uniform on [0, 1]. Beta(0.5, 0.5) is the arcsine distribution. If X ~ Beta(α, β), then (1 − X) ~ Beta(β, α). The Beta distribution is related to the F-distribution: if X ~ Beta(α, β), then X/(1−X) · β/α ~ F(2α, 2β). For large α + β with fixed mean, Beta converges to a Normal distribution. The order statistics of n uniform samples follow Beta distributions: the k-th smallest is Beta(k, n − k + 1).