pg 354

  1. A random walker starts at 0 on the x-axis and at each time unit moves 1 step to the right or 1 step to the left with probability 1/2. Estimate the probability that, after 100 steps, the walker is more than 10 steps from the starting position.

Answer:

total_steps <- 100
probability <- 0.5
q = 1 - probability
variance = total_steps * probability * q
std_dev = sqrt(variance)
prob <- 1 - pnorm(10, mean = 0, sd = std_dev)
prob
## [1] 0.02275013

The probability that the walker is more than 10 steps away from the starting position is 0.02275