# Application of optional stopping theorem

You have been captured and blindfolded by pirates, then places somewhere on a five-meter-long wooden plank. Disoeriented, each step you take is a meter long but in a random direction - either towards the sharks waiting at one end or eventual freedom at the other. If x (integer) is the distance in meters you start from the safe end, determine the probability of your survival as a function of x.

My attempt, $$M_n$$ be position at time $$n$$, so that $$M_0 = x$$ and clearly is a martingale.

Let $$\tau = min\{n: M_n = 0 \space\text{and} \space M_{n-1},...,M_0 \neq 5\}$$. (Case $$M_0 = 5$$ is trivial.)

Then by optional stopping theorem we have $$\mathbb{E}M_{\tau} = \mathbb{E}M_0 = x = 0 * \mathbb{P}(\text{reaching safety before sharks})$$

But clearly I'm not able to get the probability out of this.

Could please someone explain what is wrong?

• Your definition of $\tau$ doesn't make sense. What is the smallest $n$ such that $M_n=0$ "before" $M_n=5$? Sep 25, 2018 at 18:04
• You right, it should be Let $\tau = min\{n: M_n = 0 \space\text{and} \space M_{n-1},...,M_0 \neq 5\}$.
– Paul
Sep 25, 2018 at 18:07
• Well, sure, but a time like that might never happen. What if you start at $1$ and just go $1,2,3,4,5$? Sep 25, 2018 at 18:13
• If that's the case, then $\tau$ is unbounded on non-countable set and therefore you can not apply optional stopping theorem (not with my definition of $\tau$ that is)?
– Paul
Sep 25, 2018 at 18:19
• $\tau$ is simply not defined, it would only be unbounded if you arbitrarily set $\tau=+\infty$ when $5$ comes up first. But yes, it's undefined on a non-negligible (uncountable is neither here nor there) set and therefore you presumably can't apply optional stopping. Sep 25, 2018 at 18:22

What you really want is the stopping time $$T=\min\{n\mid M_n=0\text{ or }M_n=5\}$$. This stopping time is well-defined everywhere.
After that, you had the right idea... indeed, we have $$E(M_T)=E(M_0)=x$$. And normally you'd be right, in general the expected value of a random variable tells you almost nothing about the probability distribution of the variable. But this is a very special case, and it happens that in this case, you can in fact deduce the probability you want from the expected value.
Here's a hint: what values can the variable $$M_T$$ take?