Gambler's Ruin problem. Probability of reaching Nbefore0 starting at $k.
Assistant
First, I need to understand what's being asked: Gambler's Ruin problem. Probability of reaching 0 starting at $k.
Nbefore
Key values given: 0
My approach:
Win the
bet (probability p), moving to state k+1,
win from there (probability Pk+1).
Lose the
bet (probability q), moving to state k−1,
win from there (probability Pk−1).
This gives us the difference equation:
Pk=pPk+1+qPk−1
Establish Boundary Conditions
If the gambler has 0, they are ruined: P0=0.
This gives us the final answer: -\frac{1}{\left(\frac{q}{p}\right)^N - 1} + \frac{
The Gambler's Ruin problem calculates the probability of a gambler reaching a certain wealth N before going bankrupt (reaching 0), given they start with k and bet 1 unit per game.
Let Pk be the probability of reaching N starting from k.
Let p be the probability of winning a bet, and q=1−p be the probability of losing.
Step-by-Step Derivation
1. Set up the Recurrence Relation
To reach N from state k, one of two things must happen first:
Win the first bet (probability p), moving to state k+1, then win from there (probability Pk+1).
Lose the first bet (probability q), moving to state k−1, then win from there (probability Pk−1).
This gives us the difference equation:
Pk=pPk+1+qPk−1
2. Establish Boundary Conditions
If the gambler has 0, they are ruined: P0=0.
If the gambler has N, they have reached the goal: PN=1.
3. Solve the Recurrence
Rearrange the equation:
pPk+1−Pk+qPk−1=0Pk+1−p1P
The characteristic equation for this linear recurrence is:
r2−p1r+pq=0
Multiplying by p:
pr2−r+q=0
Solving for roots r:
(r−1)(pr−q)=0
The roots are r1=1 and r2=q/p.
The general solution is of the form:
Pk=A(r1)k+B(r2)k=A+B(pq)k
We must now consider two cases based on whether the game is fair or unfair.
Case 1: The Unfair Game (p=q)
Since q/p=1, we use the general form Pk=A+B(pq)k.