Charta is on Google Play: practise on the go. Get the app

Work out a random variable's expected value and variance

CFA® Level I · Quantitative Methods · Statistical Distributions for Financial Asset Prices and Returns · QM.4.b

The idea

Expected value is the probability-weighted average of every possible outcome: E(X) = sum of p(x) times x. It is what the variable would average over many repetitions, not what will happen on any single occasion, and it need not be a value the variable can actually take. Variance is the probability-weighted average of squared deviations from that expected value, and its square root is the standard deviation. Together they are the two numbers most of portfolio theory runs on: one for what is expected, one for how far reality is likely to sit from it.

Formulas

Expected value of a random variable

E(X) = Σ P(xᵢ) xᵢ

P(xᵢ)
the probability of outcome i
xᵢ
the value of outcome i

The probabilities must sum to one. It is a weighted average, and need not be an outcome the variable can actually take.

Variance of a random variable

σ² = Σ P(xᵢ) × (xᵢ − E(X))²

σ²
the variance
P(xᵢ)
the probability of outcome i
xᵢ
outcome i
E(X)
the expected value

The probability-weighted squared distance from the mean. The standard deviation is its square root.

A practice question

From the question bank, with the reason each wrong option is wrong.

What does the expected value of a random variable represent?

  1. The probability-weighted average of all outcomes - correct
  2. The single outcome that is most likely to occurWhy not: That is the mode. The expected value need not be a value the variable can take - a fair die averages 3.5, which no roll shows.
  3. The best outcome that the variable could produceWhy not: That is the maximum, the largest possible outcome. The expected value is pulled toward the outcomes that carry the most probability, not the largest one.

Expected value is the average result you would get if you could repeat a situation many times. Each possible outcome is weighted by how likely it is. Expected value = P1 x X1 + P2 x X2 + ... + Pn x Xn. For example, a fair die has outcomes 1 to 6, each with probability 1/6, so the expected value is 3.5. It is not the most likely outcome and not the highest one.

A harder one

Priya Nair, a fixed-income analyst at an asset manager, assigns probabilities to next year's return on a corporate bond fund: a 20% chance of -4%, a 50% chance of 3% and a 30% chance of 8%. She needs the fund's risk measured in the same way the expected return is, using these probabilities. What is the variance of the fund's return, in percent squared?

  1. 17.29 - correct
  2. 4.16Why not: This is the square root of the variance, which is the standard deviation (4.16%). The question asks for the variance, which is in percent squared.
  3. 24.81Why not: This averages the three squared deviations with equal weights of one third each. Variance weights every squared deviation by its probability, so the likely 3% outcome must count more than the unlikely -4% outcome.

Variance measures how widely outcomes scatter around the expected value, with likely outcomes counting more. Formula: Variance = sum of P x (outcome - expected value)². Step 1, expected return: 0.20 x (-4) + 0.50 x 3 + 0.30 x 8 = 3.1%. Step 2, squared gaps from 3.1: (-7.1)² = 50.41, (-0.1)² = 0.01, 4.9² = 24.01. Step 3, weight them: 0.20 x 50.41 + 0.50 x 0.01 + 0.30 x 24.01 = 17.29 percent squared. The 4.16 is the standard deviation (the square root). The 24.81 uses equal weights, ignoring probabilities.

The hardest tier

Why can the expected value of a random variable be an outcome that never occurs?

  1. Because the probabilities need not sum to oneWhy not: They must sum to one. The expected value is a weighted average with weights that already total one; that is not the reason.
  2. Because a variance term is subtracted from itWhy not: Nothing is subtracted. Variance is a separate statistic measured around the expected value.
  3. Because it is an average, not a chosen outcome - correct

Expected value is a weighted average, not a pick of one outcome. Expected value = sum of (Probability x Outcome). An average does not have to match any single result. For a fair die, (1 + 2 + 3 + 4 + 5 + 6) / 6 = 3.5, yet no roll ever shows 3.5. So expected value describes what happens over many repeats rather than in any single trial.

In the app: 9 practice questions on this outcome, a narrated walkthrough with diagrams, spaced review that brings it back before you forget it.

Take the free diagnostic →

More in Statistical Distributions for Financial Asset Prices and Returns