Home/Study Plan/Conditional Expectation & Tower Property
📊

Expected Value & Linearity

Conditional Expectation & Tower Property

Hard5–6 hrsConditional ExpectationRecursionTower Property

Overview

Conditional expectation turns hard sequential problems into simple algebra. The key is the first-step decomposition: instead of thinking about the whole path, you ask 'what can happen in the very next step, and what is my expected position after that?' This converts an infinite-horizon problem into a finite system of equations. The tower property E[X] = E[E[X|Y]] is a theorem that formalizes this decomposition.

How to Recognize

  • Problem has natural stages or phases — condition on 'what happens first'
  • Expected duration/steps to reach a state
  • Can condition on the first step or first outcome
  • Problem looks like a random walk or sequential process

Step-by-Step Approach

  1. 1.Step 1: Identify the relevant states (what information determines the future?)
  2. 2.Step 2: Condition on what happens in the FIRST step
  3. 3.Step 3: E[X] = E[E[X|first step]] — law of total expectation
  4. 4.Step 4: Set up equations: E[X|state i] = 1 + Σⱼ P(go to j|in state i)·E[X|state j]
  5. 5.Step 5: Solve the system of linear equations

Key Formulas

01Tower property: E[X]=E[E[XY]]E[X] = E[E[X|Y]]
02Geometric: E[Tsuccess]=1/pE[T_{\text{success}}] = 1/p
03Absorbing Markov: ti=1+jAPijtjt_i = 1 + \sum_{j \notin A} P_{ij}\,t_j
04Variance: Var(X)=E[Var(XY)]+Var(E[XY])Var(X) = E[Var(X|Y)] + Var(E[X|Y]) (Eve's law)

Worked Examples

0Quick Example
Expected flips to see HH: E_S = 1 + ½E_H + ½E_S, E_H = 1 + ½·0 + ½E_S. Solve: E_S = 6.

Problem

Flip a fair coin repeatedly. What is the expected number of flips until you've seen at least one head AND at least one tail?

Solution

1

States: Start (neither H nor T seen yet — but the first flip gives one of them).

2

After first flip: you've seen exactly one of {H, T}. Need the other.

3

From state 'need the other outcome': each flip has P(1/2) of giving what you need.

4

Expected additional flips from 'need other' state = geometric with p=1/2 → E = 2 additional flips.

5

Total expected flips = 1 (first flip) + 2 (expected flips to get the other) = 3? Let's verify.

6

Wait: first flip always gives you ONE type. Then you need the other, which takes Geometric(1/2) = 2 flips on average. Total = 1 + 2 = 3.

Answer

E=3E = 3 flips. After the first flip (cost 1), you need Geometric(1/2) = 2 more flips to see the other outcome.

Common Mistakes

  • !

    Setting up the recursion but forgetting the '+1' term for the current step cost.

  • !

    Not properly handling boundary conditions in the recursion (absorbing states have tᵢ = 0).

  • !

    Using E[E[X|Y]] = E[X] but forgetting the conditions when Y affects the range of X.

Practice Problems

Click "Show Answer" to reveal
1

Expected number of fair coin flips to see 3 consecutive heads (HHH)?

Hint: States: 0 heads, 1 head, 2 heads, 3 heads (done). Write equations for each state.
2

A frog is on lily pad 1. Each jump, it goes to any other pad (2–5) with equal probability. Pad 6 is the exit. What is the expected number of jumps to reach pad 6, if from pad 6 it has arrived?

Hint: From any pad 1–5, P(jump to pad 6) = 1/5 (going to any of pads 2–6, one of which is 6)... careful about the setup.

Only works in the Electron app

<webview> is an Electron-only tag. Run npm run electron:dev to use this.

25:00Focus
0

25 min focus · 5 min break · long break every 4 sessions

The Ultimate Grind