Dynamic Programming21 sections · 916 units
Open in Course

Challenge: Infinite Expected Value

When expectation diverges

Some probability processes have infinite expected value. Example: flip coin until heads. Expected flips = 2. But: pay 2n2^n if first heads is on flip nn. Expected payout = n=12n2n=\sum_{n=1}^{\infty} 2^n \cdot 2^{-n} = \infty.

This is the St. Petersburg paradox. In DP, watch for recurrences like E=1+EE = 1 + E with probability 1 (infinite loop). The expected value is undefined. make sure your probability DP has absorbing states (termination) with positive probability from every state.