Skip to content
FiftyCalc Free calculators for all 50 states

Beta Distribution Calculator

Test cases replayed : 4 of 4 match · Methodology · No outside source listed

Enter the two shape parameters and a value between 0 and 1.

Result

Sample figures

Cumulative probability P(X ≤ x)—

Density f(x) —

  • Mean α ÷ (α + β)—
  • Variance—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Beta Distribution Calculator

Shape parameter α: enter 0 or more. Prefilled example: 2.

Shape parameter β: enter 0 or more. Prefilled example: 5.

Value x (0 to 1): enter a number from 0 to 1. Prefilled example: 0.3.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Shape parameter α: enter 0 or more.
  2. Shape parameter β: enter 0 or more.
  3. Value x (0 to 1): enter a number from 0 to 1.
  4. Read the result: Cumulative probability P(X ≤ x); the panel also shows Density f(x), Mean α ÷ (α + β) and Variance.

How this calculator works

Density f(x) = x^(α − 1) (1 − x)^(β − 1) ÷ B(α, β) for 0 < x < 1, where B(α, β) = Γ(α) Γ(β) ÷ Γ(α + β) is the beta function.

The cumulative probability is the regularized incomplete beta function I(x; α, β), evaluated with the Numerical Recipes continued fraction. Mean = α ÷ (α + β); variance = α β ÷ ((α + β)² (α + β + 1)).

The formula

  1. Cdf={1if x≥1fcdf⁡(x×ba×(1−x),2×a,2×b)otherwise
Symbols used in the formula
SymbolMeaning
aShape parameter α
bShape parameter β
xValue x (0 to 1)
CdfCumulative probability P(X ≤ x)
fcdf(x, a, b)the probability that an F variable with a and b degrees of freedom is at most x.

Worked example

Shape parameter α2
Shape parameter β5
Value x (0 to 1)0.3
Density f(x)2.1609
Mean α ÷ (α + β)0.2857
Variance0.0255
  1. Cdf=fcdf⁡(0.3×52×(1−0.3),2×2,2×5)=0.579825

Cumulative probability P(X ≤ x) 0.5798

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

What is the beta distribution used for?

Modeling a proportion or probability, such as a conversion rate; in Bayesian statistics it is the usual prior for a binomial probability.

What does Beta(1, 1) look like?

It is the uniform distribution on 0 to 1: the density is 1 everywhere and P(X ≤ x) = x.

Questions answered

Related calculators