Question
Check your answer
Solution
Answer: \( \frac{b}{a + b} \)
Let \( P_a \) be the chance that we end at \( a \), and let \( 1 - P_a \) be the chance that we end at b. Letting \( X \) be the position on the x-axis at the end of the game, the expected value equation is given by \[ E[X] = a * P_a - b * (1 - P_a) \] We have a lot of variables, so we can simplify this further. Note that \( E[X] = 0 \), since the distribution is symmetric. \[ 0 = a * P_a - b * (1 - P_a) \] \[ 0 = a * P_a - b + b * P_a \] \[ b = P_a (a + b) \] \[ P_a = \frac{b}{a + b} \] Therefore, the the odds that you move a steps forward before moving b steps backward is \( \frac{b}{a + b} \).