Paper 2, Section II, F

Probability
Part IA, 2019

Let mm and nn be positive integers with n>m>0n>m>0 and let p(0,1)p \in(0,1) be a real number. A random walk on the integers starts at mm. At each step, the walk moves up 1 with probability pp and down 1 with probability q=1pq=1-p. Find, with proof, the probability that the walk hits nn before it hits 0 .

Patricia owes a very large sum £2(N£ 2(N !) of money to a member of a violent criminal gang. She must return the money this evening to avoid terrible consequences but she only has £N£ N !. She goes to a casino and plays a game with the probability of her winning being 1837\frac{18}{37}. If she bets £a£ a on the game and wins then her £a£ a is returned along with a further £a£ a; if she loses then her £a£ a is lost.

The rules of the casino allow Patricia to play the game repeatedly until she runs out of money. She may choose the amount £a£ a that she bets to be any integer a with 1aN1 \leqslant a \leqslant N, but it must be the same amount each time. What choice of aa would be best and why?

What choice of aa would be best, and why, if instead the probability of her winning the game is 1937\frac{19}{37} ?