StatGardenREF. DESK
Calculators/Statistics/Beta distribution
Statistics

Beta distribution calculator

PDF, mean and variance of a beta distribution from its two shape parameters.

What this calculator does

Beta distribution works out pDF, mean and variance of a beta distribution from its two shape parameters. Enter your own figures above and the answer updates as you type: nothing is fixed in the code, so the result reflects exactly the numbers you supply.

The formula this calculator evaluates is printed under the tool and explained below, so you can check the working by hand or reuse it in a spreadsheet.

The formula

Formulaf(x) = x^(α−1)(1−x)^(β−1) / B(α, β), where B(α, β) = Γ(α)Γ(β) / Γ(α+β). Mean = α/(α+β), Var = αβ / [(α+β)²(α+β+1)]

The inputs explained

FieldWhat to enter
Shape αA number. Starts at 2.
Shape βA number. Starts at 5.
x (0 to 1)A number. Starts at 0.3.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How the answer changes with shape α

Every other input is held at the calculator’s starting values while shape α varies. Select any row to load that scenario into the calculator.

How the answer changes with shape α
Shape αf(x) (probability density)MeanVariance
11.20050.16670.019841
1.51.78000.23080.023669
22.16090.28570.025510
32.26890.37500.026042
41.81520.44440.024691
60.7351380.54550.020661