The expectation (also called expected value or just the mean) of a discrete r.v. is a weighted average of all the possible values of . the weight is the probability that a value occurs.

For a r.v. with possible values , we have

This also applies when , but only when the infinite series converges absolutely (otherwise, is undefined). We usually assume is well-defined.


Remember that is not a function. It’s a real number and a constant, and does not depend on anything. Given a r.v. , we have a that (usually) exists and is a single number.

One important and useful property is the Linearity of expectation.

Finding the expectation

“Adam’s law”

Also known as the Law of Iterated Expectations (LIE), Law of Total Expectation, or the Tower property. “Adam’s law” is a joke from Harvard relating it to “Eve’s law.”

For any random variables and ,

where is the conditional expectation of and .

Sum of indicator variables

To calculate the expectation of , we can use the following strategy:

  1. Represent as a sum of Indicator variables. To figure out what the indicators are, think about what is exactly counting.
  2. Calculate the expected value of each indicator.
  3. By LOE, we sum up all the expectations to get .

Darth Vader rule

“This is not a reference to a discoverer. But the designation may capture the somewhat counterintuitive—if not slightly unsettling and surreal—impression which the result can evoke on first encounter.” from P. Muldowney et al. (2012)

We can also calculate the expectation via a survival function. Let be a r.v. with support . then we can write