TITLE: Expectation of Stopping Time w.r.t a Brownian Motion
QUESTION [13 upvotes]: How do you take the expectation of a stopping time with respect to a Brownian motion?  The specific question is:
$$
\tau = \inf\{ t \ge 0: B(t) \in \{-a, b\}\}
$$
I understand the optional stopping theorem tells us that $E[M_\tau ] = E[M_0]$ but how do I use that to find the expectation?

REPLY [19 votes]: We want to use the optional stopping theorem on the two martingales $(B_t)_{t\geq 0}$ and $(B_t^2-t)_{t\geq 0}$. Note that $\tau<\infty$ a.s. so $B_\tau \in \{-a,b\}$ a.s. and hence by the optional stopping theorem, we have
$$
\begin{align*}
0&=E[B_0]=E[B_\tau]=-aP(B_\tau=-a)+bP(B_\tau=b)\\
&=-a(1-P(B_\tau=b))+bP(B_\tau=b)
\end{align*}
$$
which implies that
$$
P(B_\tau=b)=\frac{a}{a+b},\quad P(B_\tau=-a)=\frac{b}{a+b}.
$$
Using the optional stopping theorem on $(B_t^2-t)_{t\geq 0}$ we get that
$$
0=E[B_0^2-0]=E[B_\tau^2-\tau]
$$
and hence
$$
E[\tau]=E[B_\tau^2]=a^2P(B_\tau=-a)+b^2P(B_\tau=b)=ab.
$$