I've been trying very hard to understand the "simple Martingale + stopping theorem" solution to Gambler's Ruin. Sorry if this is a repeat question, but I really don't understand some of the (seemingly trivial) solutions other people have posted.
Basically, I keep seeing the following happening:
"A gambler enters a casino with $a$ dollars in cash and starts playing a game where they win with probability $\frac{1}{2}$ and lose with probability $\frac{1}{2}$. The gambler plays the game repeatedly, betting 1 dollar in each round. They leave the game if they earn a net gain of $b$ dollars or they lose all of their $a$ dollars, whichever happens first. What is the probability that the gambler will win the game." (See, e.g., https://randomdeterminism.wordpress.com/2010/07/07/gamblers-ruin/)
Now the "super simple martingale solution" goes something like this:
- Realize that the gambler's fortune $X_T$ at any time $T$ is a martingale. (Trivial. Understood)
- Realize that the martingale is going to stop at some finite time $\tau$. So the optional stopping theorem can be applied. The optional stopping theorem tells me that $\mathbb{E}[X_\tau] = \mathbb{E}[X_0]$. (Also pretty clear. Understood)
- Let $\tau_L$ be the smallest time at which the gambler's fortune loses all $a$ dollars and $\tau_W$ be the smallest time at which the gambler's gains a net of $b$ dollars and $\tau = min(\tau_L, \tau_W)$.
- Completely out of the blue, everyone goes on to claim that it's just OBVIOUS from steps 2 and 3 that $-aP(\tau=\tau_L) + bP(\tau=\tau_W) = 0$.
- Since $P(\tau=\tau_L) + P(\tau=\tau_W) = 1$ (not hard to see), the usual likelihood of winning $\frac{a}{N}$ follows fast.
What I completely fail to see is how to move from steps 2 and 3 to step 4. Where is this formula $-aP(\tau=\tau_L) + bP(\tau=\tau_W) = 0$ coming from? How can this be derived from $E[X_\tau] = E[X_0]$?
As far as I see $E[X_0] = a$, right? That's the value we start with? How is this suddenly expanded into this sum? The only thing that is OBVIOUS to me from this stopping theorem is that $E[X_\tau] = a$. Now trying to expand this expected value, let's say
\begin{align} E[X_\tau] &= E[\sum_{i=0}^\tau x_i] \\ &= \sum_{i=0}^\tau E[x_i] \\ &= \sum_{i=0}^\tau -1P(x_i=-1) + 1P(x_i=1) \\ &= a \end{align}
However, this sum could be insanely long. Where's the guarantee that this cancels out to $-bP(\tau=\tau_L) + aP(\tau=\tau_W)$? I'm clearly not seeing where things are going from here.
There are variations on this where people define that the gambler wins at $N$ dollars and $P_N(n)$ as the probability that the gambler wins given that they currently have $n$ dollars and then go on to say it's OBVIOUS from the stopping theorem that $NP_N(n) + 0(1-P_N(n)) = n$, which does not really help. Could anyone clarify this please?