# Initial price of digital option with barrier

Given that $$S_0 = 1, u = \frac{5}{4}, d = \frac{4}{5}, r = \frac{1}{40}$$:

The payoff of a digital option with a barrier B > S_0 on the running maximum is:

1 if $$max\{S_0, ..., S_n\} \geq B$$

0 if $$max\{S_0, ..., S_n\} < B$$

If we take n > 3 and $$B = (\frac{5}{4})^3$$ :

How do we show that the initial price of this option is:

$$v_0 = \frac{1}{(1+r)^n}*P(M_n \geq 3)$$

where M is the running maximum of a random walk Y i.e.

$$Y_k = \sum_{i=1}^{k} ξ_i$$ and $$M_n = max\{0, Y_1,..., Y_n\}$$?

I know that $$ln(S_n) = ln(\frac{5}{4})\sum_{i=1}^{n} ξ_i$$ where $$ξ_i : \{+1, -1\}$$ are i.i.d. with up probability = $$\frac{1}{2}$$ but I'm not sure how to incorporate this into the proof?