Work out a random variable's expected value and variance
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.
A practice question
What does the expected value of a random variable represent?
- The probability-weighted average of all possible outcomes — correct
- The most likely single outcomeWhy not: That is the mode. The expected value can be an outcome with zero probability — a fair die averages 3.5.
- The highest outcome that can occurWhy not: That is the maximum of the support. The expected value is pulled toward the outcomes that carry the most probability, not the largest one.
Expected value weights each outcome by its probability and sums them. It is an average over many repetitions and may not be an outcome the variable can actually produce.
A harder one
A return is 20% with probability 0.3, 10% with probability 0.5 and −5% with probability 0.2. What is the expected return?
- 8.33%Why not: (20 + 10 − 5) ÷ 3 — a simple average that gives each outcome equal weight. The 10% outcome is five times as likely as it would be under equal weighting.
- 10.00% — correct
- 12.00%Why not: The −5% treated as +5%: 0.3(20) + 0.5(10) + 0.2(5). The sign of the loss has to survive into the weighting.
0.3 × 20 + 0.5 × 10 + 0.2 × (−5) = 10.00%. A simple average of the three outcomes gives 8.33% and ignores how likely each is; treating the loss as a gain gives 12.00%.
The hardest tier
Why can the expected value of a random variable be an outcome that never occurs?
- Because 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.
- Because variance is subtracted from itWhy not: Nothing is subtracted. Variance is a separate statistic measured *around* the expected value.
- Because it is an average across outcomes, not a selection of one — correct
A fair die has an expected value of 3.5, which no face shows. The average of a set need not belong to the set, which is why expected value describes the long run rather than 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
- Use the probability rules for addition and multiplication
- Use Bayes' formula to revise a probability
- Explain the discrete uniform and the binomial distribution
- Use the normal distribution to work out probabilities
- Explain continuous compounding and the lognormal distribution
- Explain the chi-square, F and Student's t distributions
- Work out expected values and variances conditional on given information