Linearity of Expectation
The expectation of a sum is the sum of the expectations — always.
What is it?
For any random variables, , whether or not and are independent.
Why is it useful?
It is the single most used shortcut in interview expected-value questions and avoids computing joint distributions.
When should you think of it?
Think of it whenever the quantity is a sum of simpler pieces, even strongly dependent ones.
Think of this method when…
- The target is a total, sum or count
- Pieces are dependent (drawing without replacement, shared resources)
- Each piece has an easy expectation by itself
- You feel tempted to enumerate all outcomes
Core idea
Break the quantity into additive parts, take each part's expectation separately, and add.
Step-by-step playbook
- 1Express the target as .
- 2Compute each , using symmetry if they match.
- 3Add them up; do not worry about dependence.
Worked example
Worked example
Two cards are drawn without replacement from a standard deck with ranks A = 1 up to K = 13. What is the expected sum of the ranks?
- 1
Each card, viewed alone, is uniform over the deck, so its expected rank is .
- 2
The draws are dependent, but linearity does not care.
- Answer:
Common mistakes
- Believing independence is required.
- Applying linearity to products: in general.
- Applying it to nonlinear functions like or .
Would you use this method?
Is when ?
Practice this method
37 QuantSolve questions are tagged with this method.
Practice this method