I understand the basic concept of random walk and how to solve them but when it comes to more complex ones like the one below I don't understand how they're calculated. The books and online resources I've looked into have not really clarified any of my confusion or simplified the method of solving such problems as the one outlined below.
Problem: Consider a simple model of the price of a stock measured in pence. Each trading day t = 0, 1, 2, … the price increases by 1 pence or decreases by 1 pence with probabilities P and 1-P respectively. The changes each day are independent. Let the price at time t be denoted by Xt and assume X0=100, so that the initial price (time 0 in our model) is £1.
This stochastic process is a simple random walk with a barrier at 0. The time set (measured in days) is J = {0, 1, 2, …}. The state space (measured in pence) is the set of non-negative integers {0, 1, 2, …}.
What is then: 1) P(X3 = 101, X5 = 103 | X0 = 100 ) for the random walk problem?
The answer is: 3(1-P)*P^4
2) What is P(X2= 102, X5= 103| X0=100)
The answer is: 3(1-P)*P^4 again.
Can someone explain to me how they were worked out?