CleverSphere

Expected value and variance of a discrete variable

The expected value is the probability-weighted sum of the values; the variance measures the spread around it.

Worked example

The random variable X has this distribution. Work out the expected value and the variance.

xP(X = x)
10.10
20.20
40.50
50.20

Worked solution

  1. 1.E(X) = Σ xᵢ · pᵢ = 1 · 0.10 + 2 · 0.20 + 4 · 0.50 + 5 · 0.20 = 3.50
  2. 2.Var(X) = Σ (xᵢ − E(X))² · pᵢ = 1.65
  3. 3.Or: Var(X) = E(X²) − E(X)² = 13.9000 − 3.5000² = 1.65

Typical mistake: Confusing E(X²) with E(X)².

Your turn

Three problems of exactly this type, each time with new numbers. Comma or point; fractions like 1/6 work too.

Task 1 of 3Expected value

Task

The random variable X has this distribution. Work out the expected value and the variance.

xP(X = x)
00.30
10.40
30.20
40.10

E(X) (2 decimal places)

Var(X) (2 decimal places)

Comma or point; fractions like 1/6 work too.

Formulas for this topic
  • E(X) = Σ xᵢ · P(X = xᵢ)
  • Var(X) = Σ (xᵢ − E(X))² · P(X = xᵢ)
  • Shortcut: Var(X) = E(X²) − E(X)²

Typical mistake: Confusing E(X²) with E(X)².

Frequently asked questions

What is the typical mistake in "Expected value and variance of a discrete variable"?

Confusing E(X²) with E(X)².

Must the probabilities add up to 1?

Yes, for a complete distribution. It is a good check before you calculate.