If a gambler, starting with x=1, plays a fair game (p = 1/2) in which he wins or loses 1 unit on each play, he would be certain to lose all his money eventually, even though the game is fair. However, a counter-intuitive fact is that the avg #(rounds) til bankruptcy is not finite.

In order to have an even chance of not going bankrupt, the game must be a favourable one with p = 2/3 or greater.

gambler has dollars to start. each round, he either wins $1 with probability p or loses $1 with probability q = 1-p. he will stop once he makes dollars or loses everything. P(he ends up with dollars)?

Let = the prob he ends up with dollars from any initial state , so the boundary probabilities are and

The probability of reaching N from i-1 (after a loss), so we have the recurrence relation

Let’s try to get a closed form solution:

Using this, we get

Using , we have