# Hitting Time Probability of Brownian Motion (Martingale Approach)

I was self-studying a book on stochastic calculus and got some difficulties dealing with the following question.

Suppose $$W_t$$ is a Brownian motion path and $$T$$ is a random hitting time. The stopped process is: $$X_t= \begin{cases} W_t & t < T \\ W_T & t \geq T \end{cases}$$ I have shown that $$X_t$$ is a martingale.

The question is: Suppose $$W_0 = 0$$, and $$x_l<0, and that $$T$$ is the first hitting time, which is $$T=min\{t|W_t=x_l\ \text{or} \ W_t = x_r\}$$. Use the fact that this stopped process is a martingale to find a formula for $$Pr(W_T = x_l)$$. Assumption here is $$E[T]<\infty$$.

Since $$X_t$$ is a martingale and $$\mathbb ET<\infty$$, we can apply the optional stopping theorem to conclude that $$\mathbb EX_T=\mathbb EX_0=\mathbb EW_0=0$$. Now, $$X_T$$ is a random variable that satisfies $$\mathbb P(X_T\in\{x_l,x_r\})=1$$. Thus, we have the system of equations $$\mathbb P(X_T=x_l)+\mathbb P(X_T=x_r)=1,\qquad x_l\mathbb P(X_T=x_l)+x_r\mathbb P(X_T=x_r)=0,$$ where the second equation comes from expressing the expectation $$\mathbb EX_T$$ in two different ways. Solving the system of equations yields $$\mathbb P(X_T=x_l)=\frac{x_r}{x_r-x_l}\qquad \mathbb P(X_T=x_r)=\frac{-x_l}{x_r-x_l}.$$ Thus, $$\mathbb P(W_T=x_l)=x_r/(x_r-x_l)$$.