In: Statistics and Probability
A man starts a random walk at a lamp post.
a)What is the probability he ends up back at the lamp post after 8 steps?
b)There is a wall 3 steps down the path. What is the probability he ends up back at the lamp post after 10 steps? Within 3 steps of the lamp post after 10 steps?
c)There is a pit of alligators 3 steps down the path. If he takes 10 steps, what is the probability the man falls into the pit and is eaten?
a) total number of steps that need to be taken is 8. In order to reach the lamp post back again, 4 forward steps and 4 backward steps need to be taken
therefore, the number of ways he can reach lampost back again = 8!/4!*4!
Total number of ways he can take 8 steps = 2^8
==> Probability that the man comes back = (8!/4!*4!)*1/2^8
b) Now the total number of steps = 10, therefore the person has to take 5 steps forwards anf 5 steps back ward, but there is a wall 3 steps down the road. First we calculate all the possible ways to reach lamp post in 10 steps and then subtract the combinations in which he takes more than 3 steps down the road
the number of ways he can reach lamppost in 10 steps = 10!/5!*5! = 252
the number of ways he takes more than 3 steps down the road = (6!/3!*3!)*2! = 40
therefore, probability = (252-40)/2^10 = 0.21
c) Among the 10 steps, he has to take 7 steps forward and 3 steps backward to be eaten by alligators
Total number of ways in which one can take 7 steps forward and 3 steps backward = 10!/(7!*3!) = 120
But we need to subtract the cases in which he takes more than 4 steps forward at a time = (7!/4!*3!)*2! =70
therefore the probability = (120-70)/2^10 = 0.049