Suppose a gambler plays a sequence of fair games. Show that the chance of being $a$ points ahead before first being $d$ points down is $a/(a+d)$. Suppose a gambler plays a sequence of fair games, at each of which they are equally likely to lose a point or gain a point. Show that the chance of being $a$ points ahead before first being $d$ points down is $a/(a+d)$.
I do not really understand what the question is asking, so it is hard to make a start on this one.
 A: This is a game where it either ends on $a$ points or on $-d$ points and in each turn you can gain $+1$ or $-1$ points. Now we need to calculate the probability of winning (i.e. reaching $a$ points). Define $P_i$ as below:
$$
P_i = \text{probability of starting from i points and winning} \quad\quad -d\leq i \leq a
$$
Now define event $s$ as the next gain. $s$ corresponding to gaining 1 point and $\bar{s}$ corresponding to losing one. Now using the law of total probability it follows that:
$$
P_i = \mathbb{P}(\text{starting from i then losing one point then winning})\mathbb{P}(\bar{s}) + \mathbb{P}(\text{starting from i points then gaining one point then winning})\mathbb{P}(s)
$$
Because it's a fair game you can simplify $P_i$ more:
$$
P_i = \frac{1}{2}P_{i-1} + \frac{1}{2}P_{i + 1}
$$
It's obvious that $P_a = 1$ and $P_{-d} = 0$. Solving the equation w.r.t the initial conditions gives the following answer.
$$
P_i = \frac{i+d}{a+d}
$$
And for $i=0$:
$$
P_0=\frac{d}{a+d}
$$
Which is the other way around as mentioned in the comments.
this was a variation of Gambler's Ruin problem in which the coin was fair.
A: Let $X_i$ be the position at time $i$, i.e. total wins - total loses up to that point. If we ever hit $+a$ or $-d$, we stop the game.
Notice that $E(X_{i+1}|X_i) = X_i$. This thing is called a martingale. With double expectation formula, you can get
$E(X_i|X_{i-2}) = E(E(X_i|X_{i-1})|X_{i-2}) = E(X_{i-1}|X_{i-2}) = X_{i-2}$
Apply this repeatedly, you get $E(X_i) = X_0 = 0$.
Now if we talk about the limiting distribution, it's at either $a$ or $-d$, so the probability of hitting $a$ would be $d/(a+d)$, so to make the expectation 0.
Admittedly the last step is kind of sketchy and not suitable for homework answer, but somehow this line of thought is easier to remember for me. A proper treatment is called stopping time theorem.
