I have a mathematic question about gambling.
Given that Peter is gambling and
- the winning probability $50\%$.
- gain \$1 for winning, lose \$1 for loss
- Initial capital: $\$A$
- the game will end either capital reach $\$B$ or Peter lost all.
- $n$ is the number of game playing.
- $P(n)= \text{[probability of lost all]}$
Therefore,
$$ P(0)=1; \qquad P(B)=0 $$
and
$$ \begin{array}{rc} & P(n) = 50\% \cdot P(n-1) + 50\% \cdot P (n+1) \\ \implies \quad & 2P(n) = P(n-1) + P(n+1) \\ \implies \quad & P(n)-P(n-1) = P(n+1) - P(n). \end{array} $$
$ ``\text{change of $P$''} = 1/B $
Therefore $P(A) = 1-A/B$.
If $B = \infty$, then $P(\infty) = 1$.
My question is, how about if the game winning probability is $60\%/40\%$ instead of $50\%/50\%$? How should I calculate?
Thank you a lot.