How long the walk lasts
A token starts at position on the integers. At each step it moves one unit left or right with probability each. It stops when it first reaches or .
Find the expected number of steps.
Fractions, decimals with at least 3 significant digits, and expressions such as sqrt(2)/2, e^-1 or pi/4.
Let be the expected number of steps from position . Then and .
The second difference is constant. What kind of function has a constant second difference?
h
s Shown after a correct answer. Revealing it first marks the problem as seen, not solved.
Idea. The expected duration satisfies a recurrence whose second difference is constant, so it is a quadratic in the starting point. The two boundary conditions pin it down.
Step 1: recurrence. Conditioning on the first step, which rearranges to .
Step 2: solve. A constant second difference of means is a quadratic with leading coefficient . The quadratic that vanishes at and is Check: .
Step 3. From , the expected number of steps is .
Remark. The formula is worth remembering: starting in the middle of gives , which shows the walk spreads like the square root of time.