Beta Distribution Explained with Worked Examples

The beta distribution on has density , mean and variance . It models proportions and probabilities.

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What Beta distribution means

For , : , so ; the mean is , the variance and . The beta function is in the beta function. For the density is symmetric with mean 0.5.

The parameters act like counts of successes and failures: it is the conjugate prior for a binomial proportion, so a prior with successes and failures updates to (beta–binomial conjugacy, Bayes' theorem). is the uniform distribution (the continuous uniform distribution).

It is a ratio of gamma-type integrals (the gamma distribution): if and are independent gammas with the same rate, is beta. The density is integrated with integration by parts for integer parameters.

What is it used for?

The beta distribution describes uncertain proportions between 0 and 1.

How to use beta distribution

  1. Identify and and compute .
  2. Mean .
  3. Evaluate the density at the required .
  4. For a posterior add the observed successes and failures to .

Graph

Beta(2, 3) density 12x(1 − x)²f(0.5) = 1.5mean 0.400.10.20.30.40.50.60.70.80.9100.511.52Beta(2, 3) density 12x(1 − x)²xdensityf(x) = 12x(1 − x)²Graph with x from 0 to 1 and y from 0 to 2.1. Shows the curve f(x) = 12x(1 − x)²; point f(0.5) = 1.5 at (0.5, 1.5); point mean 0.4 at (0.4, 1.728).

The density is skewed towards the lower values, with mean 0.4.

Worked examples

These examples are worked by hand, step by step, so you can compare your own working.

Example 1: mean

Find the mean of .

Worked example
Answer
0.40.4
  1. Formula

Example 2: density at 0.5

Find for .

Worked example
Answer
1.51.5
  1. B(2, 3)
  2. f

Example 3: variance

Find the variance of .

Worked example
Answer
0.040.04
  1. Formula

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

a = 2, b = 3

mean a/(a + b)

0.4.

Variance

ab/((a + b)²(a + b + 1))

0.04.

Density at 0.5

x(1 − x)²/B(2, 3), B = 1/12

1.5.

Mode

(a − 1)/(a + b − 2)

1/3.

Word problems

Beta(a, b) on (0, 1) has density x^(a−1)(1 − x)^(b−1)/B(a, b), mean a/(a + b) and variance ab/((a + b)²(a + b + 1)).

Mean

a = 2, b = 3. Find the mean.

  1. 2/5
  2. Check: ✓0.4

Variance

Find the variance.

  1. 6/150
  2. Check: ✓0.04

Density Higher

Find f(0.5) with B(2, 3) = 1/12.

  1. 12 × 0.5 × 0.25
  2. Check: ✓1.5

Mode Higher

Find the mode.

  1. 1/3
  2. Check: ✓0.3333

Common mistakes

Mean a/b

wrong ✗

a/(a + b) ✓

Divide by the total.

Support

x > 1 allowed ✗

0 < x < 1 ✓

Proportions.

Mode when a < 1

formula applies ✗

peak at the boundary ✓

Needs a, b > 1.

B(a, b) = ab

wrong ✗

Γ(a)Γ(b)/Γ(a + b) ✓

Beta function.

Exam tips

  1. Mean a/(a + b).
  2. a = b = 1: uniform.
  3. Conjugate for binomial p.
  4. Mode (a − 1)/(a + b − 2).
  5. On (0, 1).

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. Mean a = 1, b = 1 Foundation

0.5

2. Mean a = 4, b = 6 Foundation

0.4

3. Variance a = b = 1 to 4 d.p. Foundation

0.0833

4. Mode a = 3, b = 3 Higher

0.5

5. Mean a = 2, b = 8 Higher

0.2

6. Variance a = 2, b = 3 to 2 d.p. Higher

0.04

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Beta distribution
Shapes a, b on (0, 1).
Beta function
B(a, b).
Conjugate prior
Prior for a probability.
Uniform
Beta(1, 1).
Mode
Peak.
Proportion
Value between 0 and 1.

Frequently asked questions

What is the beta distribution?

A distribution on (0, 1) for proportions.

What is its mean?

a/(a + b).

What is Beta(1, 1)?

Uniform.

Why use it for probabilities?

It is conjugate to the binomial.

Which page covers the gamma distribution?

gamma distribution.

Which page covers the hypergeometric?

hypergeometric distribution.

More in Advanced statistics and stochastic processes and the formula sheets.