Great expectations: The theory of optimal stopping