# Variance of a random variable

The variance Var(X) measures spread around the expected value: Var(X) = E(X squared) - (E(X))^2. The standard deviation is its square root.

Statistics (university) · Part 03: Random variables and discrete distributions · Card 3 of 8 · Last updated 2026-10-19

## Analogy

Two games can both pay 10 on average. The one with wild swings has the larger variance.

## Example

**Variance from a table**

x: 0, 1, 2; P: 0.5, 0.3, 0.2
E(X) = 0.7
E(X squared) = 0 + 0.3 + 0.8 = 1.1
Var = 1.1 - 0.49 = 0.61
SD = square root of 0.61 = 0.78

## In practice

Variance measures risk. Investments with the same expected return can differ hugely in variance.

## Practice

### Flashcards

- **Formula for variance of X?** Var(X) = E(X squared) - (E(X))^2.

## Questions people ask

### Why is variance measured in squared units?

Variance averages squared gaps, so the units are squared too: metres become square metres. That is awkward to interpret, which is why we usually quote the standard deviation, the square root of the variance, in the original units. Then a spread of 2 metres is easy to picture.

### What does a variance of zero mean?

It means the variable never changes: every outcome equals the expected value. There is no randomness at all. Any real chance process has positive variance. A larger variance means outcomes are more likely to land far from the average, so the same expected value can hide very different risks.

## Related concepts

- [Random variable](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-3/statistics-university-part-3-concept-1)
- [Expected value](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-3/statistics-university-part-3-concept-2)
- [Linear rules for mean and variance](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-3/statistics-university-part-3-concept-4)

Web page: https://studyvisually.com/learn/science/statistics-university/statistics-university-part-3/statistics-university-part-3-concept-3
Study this card in the app: https://studyvisually.com/app/learn?category=statistics-university&card=statistics-university-part-3-concept-3
