I am trying to figure out a question concerning a problem found here: Brainteaser: Player A has £1, Player B £99. They flip a coin. The loser pays the other £1. Expected number of games before one is bankrupt?. The original problem was the following one:
Player A has £1, Player B £99. They flip a coin. The loser pays the other £1. What is the expected number of games they play before one is bankrupt?
To find out, jimmyk4542 found a recurrence relation resulting in an average of 99 coin flips before player A goes bankrupt.
I am trying to figure out what the variance is. Could anyone point me in the right direction?
Say $A$ is a random variable such that $A_n$ returns the number of coin flips before either player loses given Player 1 has $n$ pounds. Then \begin{equation} V(A_n)=E(A_n^2)-E(A_n)^2 \end{equation} obviously the latter part of the equation is known. I am trying to figure out how to formulate the first part in a sensible way... anyone?
Just pointing in a direction:$$\mathbb{E}A_{n}^{2}=\mathbb{E}\left(1+A_{n-1}\right)^{2}\times\frac{1}{2}+\mathbb{E}\left(1+A_{n+1}\right)^{2}\times\frac{1}{2}$$