2

I'm trying to solve a stats problem as outlined below; I'm a bit new, however, and I'm not sure how I could solve this problem.

Assume someone has lost their keys, and uses an inefficient random walk to search. He starts at 0, and moves 1 unit to the left or right with equal probability. On the next step, he moves 2 units to the left or right again, with equal probability. For subsequent turns he follows the pattern 1,2,1 etc. How many "moves" are expected to be made until he returns to the origin?

I've written a python script to simulate it, but I'm not quite sure how I could theoretically calculate this expected value.

whuber
  • 322,774
  • Hint: consider each pair of steps. After a pair of steps, he is (with equal probability) -3, -1, +1, or +3 away from his previous position. –  Oct 30 '14 at 16:33
  • @Barrycarter That works, but one must be careful either to account for the possibility that the first in each pair returns to the origin or else make sure that one cannot return to the origin except on the second step. – whuber Oct 30 '14 at 18:46
  • @whuber Good point. I should have noted that's a first step to solving the problem. After that, you'll have to backtrack a bit to correct for the moves-occur-in-pairs assumption. –  Oct 30 '14 at 18:53

0 Answers0