# Expected value

The expected value E(X) is the long-run average of a random variable. Multiply each value by its probability and add the results. It need not be a value that can actually occur.

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

## Analogy

If you played a game thousands of times, the expected value is your average result per play.

## Example

**Weighted average**

x:      0    1    2
P(x): 0.5  0.3  0.2
E(X) = 0(0.5) + 1(0.3) + 2(0.2)
= 0 + 0.3 + 0.4 = 0.7

## In practice

Casinos and insurers price their products so the expected value favours them.

## Practice

### Flashcards

- **How do you find E(X) from a table?** Multiply each value by its probability and add.

### Interview questions

**A game costs 1 to play. You roll a fair die and win 6 if it shows a six, otherwise you win nothing. Find the expected profit and say whether the game is fair.**

- Expected winnings = 6 x 1/6 = 1
- Expected profit = 1 - 1 = 0
- Game is fair
- Expected value is a long-run average

## Questions people ask

### Does the expected value have to be a possible outcome?

No. A fair die has expected value 3.5, yet no roll gives 3.5. The expected value is a long-run average, not a prediction for one trial. Think of it as the balance point of the distribution rather than a likely result.

### How is expected value different from the mean of a sample?

The expected value is a fixed property of the whole distribution, worked out from probabilities. A sample mean is calculated from observed data and changes from sample to sample. By the law of large numbers, sample means settle near the expected value as samples grow.

## Related concepts

- [Random variable](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-3/statistics-university-part-3-concept-1)
- [Variance of a random variable](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-3/statistics-university-part-3-concept-3)
- [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-2
Study this card in the app: https://studyvisually.com/app/learn?category=statistics-university&card=statistics-university-part-3-concept-2
