Take a one dimensional random walk where the person is initially at the origin, and can move to (x+1,0), or to (x-1,0), each with probability 0.5. What is the expected number of moves to reach the origin? My attempt:
After the first move, you are either at (1,0) or (-1,0). E(reaching origin) = E(reaching (1,0) from (1,0) after the move to (1,0) in step 1) = E(reaching (-1,0) from (-1,0) after the move to (-1,0) in step 1). Hence
$E= 1/2(E + 1)$
$ (1/2)E=(1/2) $
$ E = 1.$
Is this correct?
No, this is not correct. The number of steps cannot be less than $2$, so the average is at least $2$. You are trying to define $E$ as the expected number of steps to return to the origin, but you did not account for the cases where the second step is away from the origin. You are then not in the starting case, so the approach will not work. You could define $E(n)$ as the expected time to get to the origin from point $n$ and you could write $E(0)=1+\frac 12E(1)+\frac 12E(-1)$ and use the symmetry in $n$ to make this $E(0)=1+E(1)$. You can make an infinite set of equations like this.