Expected value of reaching -7 or 10

82 Views Asked by At

Suppose that there is a man standing on the origin of the real line and plays heads or tails. Everytime he gets a head, he moves $1$ unit right and everytime he gets a tail, he moves $1$ unit left. What is the expected value of the number of his steps when he reached to $-7$ or $10$ for the first time? A friend of mine asked me this question today and my approach to solve it was quite complex. So any help is appreciated.

1

There are 1 best solutions below

2
On BEST ANSWER

Your approach is not a bad start, but you can make it a bit easier on yourself by observing that you'll never need to deal with $f_{m,n}$ except in cases where $m+n=17$.

This somewhat suggests that it would be simpler to work with $g(n)$, defined as the expected number of steps to reach either $-7$ or $10$ starting from $n$. We must then have $g(-7)=g(10)=0$ and $$ g(n) = 1 + \frac{g(n-1)+g(n+1)}2 $$ when $-7 < n < 10$. With a bit of experience with these things, we can recognize that this equation rearranges to $$ \bigl(g(n+1)-g(n)\bigr)-\bigl(g(n)-g(n-1)\bigr) = -2 $$ that is, the second differences of $g$ are $-2$. It is known that the functions with this property are exactly the quadratic polynomials with leading coefficient half the second difference: $$ g(n) = -n^2 + bn + c $$

So all that is needed is to find such a polynomial with $g(-7)=g(10)=0$. But that is easy enough: $$ g(n)= -(n-(-7))(n-10) = (n-(-7))(10-n) $$ In other words:

To find the expected number of steps to reach one of the ends, simply multiply the current distance to the two ends.

Or, in the notation of your comment: $ f_{m,n} = mn $.

In your case the result is therefore $7\times 10=70$.