I m in the point X. I m 2 blocks up from a point A and 3 blocks down from my home H. Every time I walk one block i drop a coin.
H . . . X . . A
If the coin is face I go one block up and if it is not face I go one block down.
Which is the probability of arriving home before the point A?
What I really want to do is to solve that problem in a recursive way. Maybe it can be solved with a binomial distribution... But is it also recursive?
Forming a Stochastic Matrix, with the first row being the pub and the last row being home.
$$A=\begin{bmatrix}1&0&0&0&0&0\\\frac{1}{2}&0&\frac{1}{2}&0&0&0\\0&\frac{1}{2}&0&\frac{1}{2}&0&0\\0&0&\frac{1}{2}&0&\frac{1}{2}&0\\0&0&0&\frac{1}{2}&0&\frac{1}{2}\\0&0&0&0&0&1\end{bmatrix}$$ We are solving: $$\lim_{x\to\infty}(A^x\begin{bmatrix}0&0&1&0&0&0\end{bmatrix})$$ $$=\begin{bmatrix}1&0&0&0&0&0\\0.8&0&0&0&0&0.2\\0.6&0&0&0&0&0.4\\0.4&0&0&0&0&0.6\\0.2&0&0&0&0&0.8\\0&0&0&0&0&1\end{bmatrix}\begin{bmatrix}0&0&1&0&0&0\end{bmatrix}$$ $$=\begin{bmatrix}0.6&0&0&0&0&0.4\end{bmatrix}$$ The last column represents the probability we are at home, which is $0.4$.