Expected Value
Foundations
8 min

Linearity of Expectation

E[X+Y] = E[X] + E[Y] always holds — no independence required — making it the single most useful tool in quant interviews.

1. The idea

Linearity says for any random variables and constants . Crucially, this holds whether or not and are independent, and whether or not they are even defined on a nice distribution.

This makes linearity the workhorse for messy sums: instead of finding the distribution of , split it into simple pieces, take each expectation separately, and add. Complicated dependence between terms is irrelevant to the calculation.

The technique pairs naturally with indicator variables (next lesson): write a complicated count as a sum of 0/1 variables, and linearity turns the whole problem into single-event probabilities.

2. Why it matters

Nearly every 'expected number of X' interview question is solved by decomposing into a sum and applying linearity — it converts a hard joint-distribution problem into several easy single-variable ones.

3. Core mathematics

Linearity

Holds regardless of independence or dependence.

Special case

Product needs independence

Linearity applies to sums, not products.

4. How to recognize it

Think of this when…

  • You need the expected value of a sum, total, or count
  • Variables may be dependent, so you cannot use independence-based tricks
  • The problem asks 'expected number of' something that can be broken into pieces
  • You are tempted to find a full joint distribution — linearity likely avoids that

5. Worked example

Worked example

Roll a fair die 3 times. Let be the sum of the three rolls. Find .

  1. 1

    Let be the three rolls, so .

  2. 2

    Each has the same expectation, , regardless of the others.

  3. 3

    Apply linearity directly — the rolls are independent here, but that is not required.

  4. Answer:

6. Common mistakes

  • Believing linearity requires independence — it never does
  • Applying the same additive rule to variance, where independence does matter
  • Trying to compute via linearity when it actually requires independence or covariance
  • Forgetting to split a compound sum into its simplest additive pieces before applying linearity

7. Quick check

Does linearity of expectation require independence?

If and , what is ?

8. Practice

5 QuantSolve questions use this concept.

Practice this concept

9. Related methods