The cost of a stock at the time n is modeled by the random variable X_n. We know that the collection of stock prices is given by: {X_n} from 0 to infinity. The starting price is modeled by the random variable X_0. We also know that P(X_0=200)=1.
The price of the stock at the time n depends only on the stock price at time n-1 in the following way:
P(X_n = x_n-1 + 1 | X_n-1 = x_n-1) = p,
and
P(X_n = x_n-1 – 1 | X_n-1 = x_n-1) = 1-p
We also know that
P(X_n = x | X_n-1 = x_n-1) = 0,
for every x not in {x_n-1 – 1, x_n-1 +1}