Let the state space be S = Z \mathcal{S} = \Z S = Z , a process X t X_t X t has probability p p p moving forward and probability 1 − p 1-p 1 − p moving backward (i.e. p i , i + 1 = p p_{i, i+1} = p p i , i + 1 = p and p i , i − 1 = 1 − p p_{i, i-1} = 1-p p i , i − 1 = 1 − p ). The process is called a simple random walk .
Gambler's Ruin
Gamblers's ruin is a very famous problem with a simple random walk.
Let z z z be arbitrary state, then for each state x x x we denote α ( x ) = P ( X n = z for some n ≥ 0 ∣ X 0 = x ) \alpha(x) = P(X_n = z \text{ for some } n\ge 0|X_0 = x) α ( x ) = P ( X n = z for some n ≥ 0∣ X 0 = x ) . Then we have a ( x ) = ( 1 − p ) α ( x − 1 ) + p α ( x + 1 ) a(x) = (1-p)\alpha(x-1) + p\alpha(x+1) a ( x ) = ( 1 − p ) α ( x − 1 ) + p α ( x + 1 ) .
To solve this difference equation we have:
p a ( x ) + ( 1 − p ) a ( x ) = ( 1 − p ) α ( x − 1 ) + p α ( x + 1 ) ⟹ p ( a ( x + 1 ) − a ( x ) ) = ( 1 − p ) ( a ( x ) − a ( x − 1 ) ) pa(x) + (1-p)a(x) = (1-p)\alpha(x-1) + p\alpha(x+1)\\ \implies p(a(x+1) - a(x)) = (1-p)(a(x) - a(x-1)) p a ( x ) + ( 1 − p ) a ( x ) = ( 1 − p ) α ( x − 1 ) + p α ( x + 1 ) ⟹ p ( a ( x + 1 ) − a ( x )) = ( 1 − p ) ( a ( x ) − a ( x − 1 ))
Then a ( x + 1 ) − a ( x ) = 1 − p p ( a ( x ) − a ( x − 1 ) ) a(x+1) - a(x) = \frac{1-p}{p} (a(x) - a(x-1)) a ( x + 1 ) − a ( x ) = p 1 − p ( a ( x ) − a ( x − 1 ))
a ( 2 ) − a ( 1 ) = 1 − p p ( a ( 1 ) − a ( 0 ) ) ⟹ a ( 2 ) − a ( 1 ) = 1 − p p a ( 1 ) a(2) - a(1) = \frac{1-p}{p} (a(1) - a(0)) \implies a(2) - a(1) = \frac{1-p}{p} a(1) a ( 2 ) − a ( 1 ) = p 1 − p ( a ( 1 ) − a ( 0 )) ⟹ a ( 2 ) − a ( 1 ) = p 1 − p a ( 1 )
and a ( 3 ) − a ( 2 ) = 1 − p p ( a ( 2 ) − a ( 1 ) ) ⟹ a ( 3 ) − a ( 2 ) = ( 1 − p p ) 2 a ( 1 ) a(3) - a(2) = \frac{1-p}{p} (a(2) - a(1)) \implies a(3) - a(2) = (\frac{1-p}{p})^2 a(1) a ( 3 ) − a ( 2 ) = p 1 − p ( a ( 2 ) − a ( 1 )) ⟹ a ( 3 ) − a ( 2 ) = ( p 1 − p ) 2 a ( 1 )
by induction, we have a ( n + 1 ) − a ( n ) = ( 1 − p p ) n a ( 1 ) a(n+1) - a(n) = (\frac{1-p}{p})^n a(1) a ( n + 1 ) − a ( n ) = ( p 1 − p ) n a ( 1 )
And then we can have a ( n ) − a ( 1 ) = a ( n ) − a ( n − 1 ) + a ( n − 1 ) − ⋯ + a ( 2 ) − a ( 1 ) = a ( 1 ) ∑ i = 1 n − 1 ( 1 − p p ) i a(n) - a(1) = a(n) - a(n-1) + a(n-1) - \cdots + a(2) - a(1) = a(1)\sum_{i=1}^{n-1}(\frac{1-p}{p})^i a ( n ) − a ( 1 ) = a ( n ) − a ( n − 1 ) + a ( n − 1 ) − ⋯ + a ( 2 ) − a ( 1 ) = a ( 1 ) ∑ i = 1 n − 1 ( p 1 − p ) i
That is, a ( n ) = ∑ i = 0 n − 1 ( 1 − p p ) i = { n a ( 1 ) p = 0.5 a ( 1 ) 1 − ( 1 − p p ) n 1 − ( 1 − p p ) p ≠ 0.5 a(n) = \sum_{i=0}^{n-1}(\frac{1-p}{p})^i=\begin{cases} n a(1) & p = 0.5 \\ a(1)\frac{1-(\frac{1-p}{p})^{n}}{1-(\frac{1-p}{p})} & p\ne 0.5 \end{cases} a ( n ) = ∑ i = 0 n − 1 ( p 1 − p ) i = ⎩ ⎨ ⎧ na ( 1 ) a ( 1 ) 1 − ( p 1 − p ) 1 − ( p 1 − p ) n p = 0.5 p = 0.5
By set n = z n = z n = z we have 1 = a ( n ) = { n a ( 1 ) p = 0.5 a ( 1 ) 1 − ( 1 − p p ) n 1 − ( 1 − p p ) p ≠ 0.5 ⟹ a ( 1 ) = { 1 / n p = 0.5 1 − ( 1 − p p ) 1 − ( 1 − p p ) n p ≠ 0.5 1 = a(n) = \begin{cases} n a(1) & p = 0.5 \\ a(1)\frac{1-(\frac{1-p}{p})^{n}}{1-(\frac{1-p}{p})} & p\ne 0.5 \end{cases}\implies a(1) = \begin{cases} 1/n & p = 0.5 \\ \frac{1-(\frac{1-p}{p})}{1-(\frac{1-p}{p})^{n}} & p\ne 0.5 \end{cases} 1 = a ( n ) = ⎩ ⎨ ⎧ na ( 1 ) a ( 1 ) 1 − ( p 1 − p ) 1 − ( p 1 − p ) n p = 0.5 p = 0.5 ⟹ a ( 1 ) = ⎩ ⎨ ⎧ 1/ n 1 − ( p 1 − p ) n 1 − ( p 1 − p ) p = 0.5 p = 0.5
That is, ∀ 1 ≤ i ≤ n , α ( i ) = { i a ( 1 ) = i / n p = 0.5 a ( 1 ) 1 − ( 1 − p p ) i 1 − ( 1 − p p ) = 1 − ( 1 − p p ) 1 − ( 1 − p p ) n 1 − ( 1 − p p ) i 1 − ( 1 − p p ) = 1 − ( 1 − p p ) i 1 − ( 1 − p p ) n p ≠ 0.5 \forall 1 \le i \le n, \alpha(i) = \begin{cases} i a(1) = i/n & p = 0.5 \\ a(1)\frac{1-(\frac{1-p}{p})^{i}}{1-(\frac{1-p}{p})} = \frac{1-(\frac{1-p}{p})}{1-(\frac{1-p}{p})^{n}}\frac{1-(\frac{1-p}{p})^{i}}{1-(\frac{1-p}{p})}=\frac{1-(\frac{1-p}{p})^{i}}{1-(\frac{1-p}{p})^{n}} & p\ne 0.5 \end{cases} ∀1 ≤ i ≤ n , α ( i ) = ⎩ ⎨ ⎧ ia ( 1 ) = i / n a ( 1 ) 1 − ( p 1 − p ) 1 − ( p 1 − p ) i = 1 − ( p 1 − p ) n 1 − ( p 1 − p ) 1 − ( p 1 − p ) 1 − ( p 1 − p ) i = 1 − ( p 1 − p ) n 1 − ( p 1 − p ) i p = 0.5 p = 0.5
Recurrence
In case to know if such process is transient, positive recurrent or negative recurrent, we will need to use the theorem: An irreducible MC is transient iff satisfies followed:
0 ≤ α ( x ) ≤ 1 0 \le \alpha(x) \le 1 0 ≤ α ( x ) ≤ 1 for all x ∈ S x \in S x ∈ S .
α ( z ) = 1 ∧ inf { α ( x ) : x ∈ S } = 0 \alpha(z) = 1\land \inf\{\alpha(x): x \in S\} = 0 α ( z ) = 1 ∧ inf { α ( x ) : x ∈ S } = 0 .
α ( x ) = ∑ y ∈ S p x y α ( y ) \alpha(x) = \sum_{y \in S} p_{xy} \alpha(y) α ( x ) = ∑ y ∈ S p x y α ( y ) for all x ∈ S , x ≠ z x \in S, x\ne z x ∈ S , x = z .
Since the 1st and 3rd conditions are automatically satisfied by the definition of α ( x ) \alpha(x) α ( x ) , we only need to check the 2nd condition and it's conditional on p p p .
If p < 0.5 p < 0.5 p < 0.5 , then all conditions are satisfied, then it's transient where lim i → ∞ α ( i ) = 1 − ( 1 − p p ) i 1 − ( 1 − p p ) n = 0 \lim_{i \to \infty} \alpha(i) = \frac{1-(\frac{1-p}{p})^{i}}{1-(\frac{1-p}{p})^{n}} = 0 lim i → ∞ α ( i ) = 1 − ( p 1 − p ) n 1 − ( p 1 − p ) i = 0 .
If p = 0.5 p = 0.5 p = 0.5 , then this random walk is null recurrent.