TITLE: Expected Value of Game
QUESTION [5 upvotes]: The game is as follows: Start with 1. If you are at $n$, add one with a probability $\frac{1}{n+1}$, otherwise subtract one. End the game if you hit 0.
What is the expected number of rounds that this game lasts? Through empirical data, I have calculated this value to be approximately $2e-1$, but am unsure as to how to prove this result.

REPLY [3 votes]: Here's a solution that uses basic Markov chain theory.
Let's make the state zero a reflecting boundary i.e, from zero you jump to one with probability one. This is now an irreducible Markov chain.
Direct calculation shows that $\pi_n={n+1\over 2 e\, n!}$ for $n\geq 0$ defines 
the unique invariant probability measure for the chain. Therefore, by general Markov chain
theory, the expected number of steps to return to zero starting at zero is 
$$\mathbb{E}_0(T_0)={1\over \pi_0}= 2e.$$
On the other hand, first step analysis gives 
$$\mathbb{E}_0(T_0)=1+\mathbb{E}_1(T_0),$$ so that 
$$\mathbb{E}_1(T_0)=2e-1.$$