Expectation (LOTUS)

The expectation of a random variable represents its probability-weighted average value. The generalized expectation function can be given by the Law of the Unconscious Statistician (LOTUS):

  • The expectation of a discrete random variable with a range , where , is generally defined as,

  • Similarly, the expectation of a continuous random variable is defined as

Intuition

The expectation can be seen as the average or mean of a probability distribution. It is the most expected value given all probabilities.

Properties

(Linearity) Any satisfy

The linearity of expectation can be proved by taking (sum to one rule). Then taking the definition of a random variable, we get:

Then, for random variables and ,

Why does the probability not change with the amount of variables? Well, because we simplify each event into . All of the above stems from this simple fact, since by the definition of the random variable, \set{\upomega \in \Upomega : X(\upomega) = a} and . From there, we replace with , and therefore with .

(Tail Formula) Any satisfies

For a random variable that takes values , each with probability ,

(Independence) If and are independent, then .

(Conditionality)

(Iterated/Total Expectation)

(Wald’s Identity) If , then .

(Jensen’s Inequality) Any convex satisfies .

Examples

(Expectation, Indicator Variables) Connecting Ropes

You have identical lengths of rope, each with two loose ends. You toss all ropes into a bag, swirl them around, then–without looking–pull out two ends and tie them together.

1 & \text{the two ends of rope } i \text{ are paired}, \
0 & \text{otherwise,}
\end{cases}$$

where for all . Then, is the number of self-loops after all ends have been tied. As such,

(Iterated Expectation) Dice Game

You roll a dice. For each roll, you are paid the face value. If a roll gives 4, 5, or 6, you can roll the dice again. Once you get 1, 2, or 3, the game stops.

\mathbb{E}(X)&=\mathbb{E}(\mathbb{E}(X \mid C)) \
&=\frac{1}{2} \cdot \mathbb{E}(X \mid C=0) + \frac{1}{2} \cdot \mathbb{E}(X \mid C=1) \
&= \frac{1}{2} \cdot \frac{1+2+3}{3}+\frac{1}{2} \cdot \left(\frac{4+5+6}{3}+\mathbb{E}(X)\right) \
&= 7.
\end{align}$$

We add to our payoff on the right hand side, since you continue playing if you roll 4, 5, or 6 for an indefinite amount of time.

Ace Hunt

Ace Hunt is a solo “table game” played with a freshly shuffled 52-card deck placed face-down in the center. You (the dealer) turn over cards one at a time into a single community pile, pausing only when the very first Ace appears; at that moment the hand ends and the total number of cards revealed is recorded. The person whose guess is closest to the recorded number of total cards wins.

1 & \text{i-th card is not an Ace} \
0 & \text{otherwise}.
\end{cases}$$

Coupon Collector

Let there be distinct coupon types, labeled .  You collect coupons from cereal boxes one at a time; on each trial you receive exactly one coupon, and each type is always equally likely.