# Distribution of hitting time of line by Brownian motion

I came across the following question:

Let $T_{a,b}$ denote the first hitting time of the line $a + bs$ by a standard Brownian motion, where $a > 0$ and $−\infty < b < \infty$ and let $T_a = T_{a,0}$ represent the first hitting time of the level $a$.

1) For $\theta > 0$, by using the fact that $\mathbb{E}e^{-\theta T_a}=e^{-a\sqrt{2\theta}}$, or otherwise, derive an expression for $Ee^{-\theta T_{a,b}}$, for each $b$, $−\infty < b < \infty$.

2) Hence, or otherwise, show that, for $t > 0$, $$\mathbb{P}[T_{a,b}\leq t] = e^{-2ab}\phi\left(\frac{bt-a}{\sqrt{t}}\right)+1-\phi\left(\frac{a+bt}{\sqrt{t}}\right).$$

For the first part, I ended up, by changing measure, with the (unverified) expression

$$\mathbb{E}e^{-\theta T_{a,b}}=\exp\left(-a\left[b+\sqrt{2\left(\theta+\frac{b^2}{2}\right)}\right]\right).$$

What's the cleanest way to do the second part? It seems I could either do some kind of inverse transform on the moment generating function, or calculate the moment generating function of the given distribution. Both of these seem difficult. Am I missing something, or do I just need to persevere?

Thank you.

• @Sasha Thanks. The question suggests there should be some (not too horrible) way to use the mgf in the second part. Apr 19, 2012 at 8:51

First part

The probability density of $T_{a,0}$ is well-known: $$f_{T_{a,0}}(t) = \frac{a}{\sqrt{2 \pi}} t^{-3/2} \exp\left( -\frac{a^2}{2t} \right)$$ From here, for $\theta >0$,
$$\mathbb{E}\left( \mathrm{e}^{-\theta T_{a,0}} \right) = \int_0^\infty \frac{a}{\sqrt{2 \pi t}} \exp\left( -\theta t -\frac{a^2}{2t} \right) \frac{\mathrm{d} t}{t} \stackrel{t = a^2 u}{=} \int_0^\infty \frac{1}{\sqrt{2 \pi u}} \exp\left( -\theta a^2 u -\frac{1}{2 u} \right) \frac{\mathrm{d} u}{u}$$ According to Grandstein and Ryzhyk, formula 3.471.9, see also this math.SE question, we have: $$\mathbb{E}\left( \mathrm{e}^{-\theta T_{a,0}} \right) = \frac{1}{\sqrt{2 \pi}} \cdot \left. 2 \left(2 \theta a^2\right)^{\nu/2} K_{\nu}\left( 2 \sqrt{\frac{\theta a^2}{2}} \right) \right|_{\nu = \frac{1}{2}} = \sqrt{\frac{2}{\pi}} \sqrt{2\theta} a K_{1/2}(a \sqrt{2 \theta} ) = \mathrm{e}^{-a \sqrt{2 \theta}}$$

The time $T_{a,b}$ for standard Brownian motion $B(t)$ to hit slope $a+ b t$, is equal in distribution to the time for Wiener process $W_{-b, 1}(t)$ to hit level $a$. Thus we can use Girsanov theorem, with $M_t = \exp(-b B(t) - b^2 t/2)$: $$\mathbb{E}_P\left( \mathrm{e}^{-\theta T_{a,b}} \right) = \mathbb{E}_Q\left( \mathrm{e}^{-\theta T_{a,0}} M_{T_{a,0}} \right) = \mathbb{E}_Q\left( \mathrm{e}^{-\theta T_{a,0}} \mathrm{e}^{-b a - b^2 T_{a,0}/2} \right) = \exp(-b a - a \sqrt{b^2 + 2\theta})$$

Second part

In order to arrive at $\mathbb{P}(T_{a,b} \leqslant t)$ notice that $$\mathbb{P}(T_{a,b} \leqslant t) = \mathbb{E}_Q\left( [T_{a,0} \leqslant t] \mathrm{e}^{-b a - b^2 T_{a,0}/2} \right) = \int_0^t \frac{a}{\sqrt{2 \pi s}} \exp\left( -b a - \frac{b^2 s}{2} -\frac{a^2}{2s} \right) \frac{\mathrm{d} s}{s}$$ The integral is doable by noticing that $$-b a - \frac{b^2 s}{2} -\frac{a^2}{2s} = -\frac{(a+b s)^2}{2s} = -2a b -\frac{(a-b s)^2}{2s}$$ and $$\frac{a}{s^{3/2}} = \frac{\mathrm{d}}{\mathrm{d} s} \frac{-2a}{\sqrt{s}} = \frac{\mathrm{d}}{\mathrm{d} s} \left( \frac{b s - a}{\sqrt{s}} - \frac{b s + a}{\sqrt{s}}\right)$$ Hence $$\begin{eqnarray} \mathbb{P}(T_{a,b} \leqslant t) &=& \int_0^t \frac{1}{\sqrt{2\pi}} \exp\left(- \frac{(a+bs)^2}{2 s}\right) \mathrm{d} \left( - \frac{b s + a}{\sqrt{s}} \right) + \\ &\phantom{+}& \int_0^t \frac{1}{\sqrt{2\pi}} \exp(-2ab) \exp\left(- \frac{(b s-a)^2}{2 s}\right) \mathrm{d} \left( \frac{b s - a}{\sqrt{s}} \right) \\ &=& -\Phi\left( \frac{b t + a}{\sqrt{t}} \right) + \lim_{t \searrow 0} \Phi\left( \frac{b t + a}{\sqrt{t}} \right) + \\ &\phantom{=}& \mathrm{e}^{-2 a b} \Phi\left(\frac{b t - a}{\sqrt{t}} \right) - \mathrm{e}^{-2 a b} \lim_{t \searrow 0} \Phi\left(\frac{b t - a}{\sqrt{t}} \right) \end{eqnarray}$$ where $\Phi(x) = \int_{-\infty}^x \frac{1}{\sqrt{2\pi}} \mathrm{e}^{-z^2/2} \mathrm{d} z$ is the cumulative distribution function of the standard normal variable. Since we assumed $a > 0$, $$\lim_{t \searrow 0} \Phi\left( \frac{b t + a}{\sqrt{t}} \right) = \Phi(+\infty) = 1 \qquad \lim_{t \searrow 0} \Phi\left( \frac{b t - a}{\sqrt{t}} \right) = \Phi(-\infty) = 0$$ and we arrive at c.d.f of the inverse Gaussian random variable: $$\mathbb{P}(T_{a,b} \leqslant t) = 1 - \Phi\left( \frac{b t + a}{\sqrt{t}} \right) + \mathrm{e}^{-2 a b} \Phi\left( \frac{b t - a}{\sqrt{t}} \right)$$

• @BenDerrett Evidently my answer is not helpful. Did you manage to solve it to your satisfaction. If so, I would appreciate it, if you dropped a hint, or better yet, posted it as a solution. Thanks. Apr 20, 2012 at 14:42
• Thanks for taking the time to write this. This is probably the best way to show 2). The question suggests there's an easier way to show this, assuming 1). Apr 20, 2012 at 16:03
• @BenDerrett I suspect that the problem intends to prove 2) by differentiating to find pdf, computing the Laplace transform of the pdf. I would very much like to know if there is a more elegant way. So if you find out of one, please take a moment to share. Apr 20, 2012 at 17:18
• @Sasha What do you mean by Wiener process $W_{−b,1}(t)$? Make this notation explicit, please. May 29, 2016 at 22:50
• $W_{\mu, \sigma}(t)$ denotes Wiener process with mean function $\mu t$ and covariance function $\sigma^2 \min(t_1,t_2)$ May 30, 2016 at 15:10

For the 2) I would rather use the fact that $P(T_{a,b}<t)=F_{T_{a,b}}(t)=L_\theta^{-1}(\frac{L_\theta(pdf(T_{a,b}))}{\theta})$ where $L_\theta$ denotes the Laplace transform and $L_\theta^{-1}$ the inverse Laplace transform.

using the fact that $L_\theta(pdf(T_{a,b})) = E(e^{-\theta T_{a,b}})$ which you have already computed, you only have to compute the inverse Laplace transform of $\frac{E(e^{-\theta T_{a,b}})}{\theta} = \frac{exp(−ba−a\sqrt{b^2+2θ})}{\theta}$. This would be the not "horrible" way.

• Well whats the not "horrible" way May 11, 2018 at 0:02

A solution of a similar/equivalent problem to part b, using the PDE approach. I apologize for the length of this answer, it is meant to informative, rather than short and slick.

Theorem : Let the arithmetic Brownian motion process $$X \left(t\right)$$ be defined by the following Brownian motion driven SDE $$\begin{equation} \mbox{d}X \left(t\right) = \mu \mbox{d}t + \sigma \mbox{d}{W}\left(t\right). \end{equation}$$ with initial value $$X_0$$. Let $$\tau =\inf \left(u |X(u) \ge B\right)$$ denote the first passage time for the barrier $$X_0 < B$$. Then the first passage time $$\tau$$ is distributed as Inverse Gaussian Distribution $$\begin{equation} \tau \sim IG\left(\frac{B - X_0}{\mu}, \frac{\left(B - X_0\right)^2}{\sigma^2}\right),\label{abmFirstPassageDist} \end{equation}$$ and for $$t > 0$$ the pdf of $$\tau$$ is $$\begin{equation} f(t) = \sqrt{\frac{(B - X_0)^2}{2 \pi \sigma^2 t^3}} \exp\left[-\frac{ \left(\mu t - B + X_0\right)^2}{2 \sigma^2 t}\right]\label{abmFirstPassageDensity}. \end{equation}$$

Proof: The Kolmogorov Forward Equation corresponding to the SDE is $$\begin{equation} \frac{\partial p\left(x, t\right)}{\partial t} = -\mu \frac{\partial p\left(x, t\right)}{\partial x} + \frac{1}{2} \sigma^2 \frac{\partial^2 p\left(x, t\right)}{\partial x^2}. \end{equation}$$ To obtain the survival probability function, we first solve this PDE with the following initial and boundary value conditions $$\begin{equation} p\left(x, 0\right) = \delta\left(x - x_0\right); \qquad p\left(\infty, t\right) = p\left(x = B, t\right) = 0 \qquad (t > 0)\nonumber \end{equation}$$ where $$x = x_0$$ is the starting point of the diffusive process, containing the initial concentration of the distribution and $$B > x_0$$ denotes the barrier.

Remark; Before proceeding it should be noted, if we make the Galilean transformation to eliminate the first term in the right-hand by substituting $$\xi = x - \mu t$$ and $$\tau = t$$. We'll get the equivalent problem $$\begin{equation} \frac{\partial p\left(\xi, \tau\right)}{\partial \tau} = \frac{1}{2} \sigma^2 \frac{\partial^2 p\left(\xi, \tau\right)}{\partial \xi^2}. \end{equation}$$ $$\begin{equation} p\left(\xi, 0\right) = \delta\left(\xi - x_0\right); \qquad p\left(\infty, \tau\right) = p\left(\xi + \mu t = B, t\right) = 0 \qquad (t > 0)\nonumber \end{equation}$$ which will be the corresponding setup for the PDE approach to the problem where we have drift free, scaled Brownian motion $$\begin{equation} \mbox{d}X' \left(t\right) = \sigma' \mbox{d}{W}\left(t\right). \end{equation}$$ with a barrier across which the first passage is to be obtained at $$B - \mu t$$.

Continuation of Proof In order to obtain the first passage density, I will work with the first formulation though. This BVP can be solved using the standard method of images technique.

The free-space fundamental solution (Green’s function) of this PDE is $$\begin{equation} \phi\left(x, t\right) = \frac{1}{\sqrt{2\pi \sigma^2 t}}\, \exp\left[{-\frac{\left\lbrack x - \mu t \right\rbrack^{2}}{2\sigma^2 t}}\right] \end{equation}$$ hence, given initial condition the normalized solution for an unrestricted process, starting from $$x_0$$ can be obtained as

$$\begin{equation} \phi_{x_0}\left(x, t\right) = \frac{1}{\sqrt{2\pi \sigma^2 t}}\, \exp\left[{-\frac{\left\lbrack x - \mu t - x_0\right\rbrack^{2}}{2\sigma^2 t}}\right] \end{equation}$$

To solve this problem with the method of images, the barrier at $$B$$ is replaced by a mirror source located at a generic point $$x = m$$, with $$m > B$$ such that the solutions of equation emanating from the original and mirror sources exactly cancel each other at the position of the barrier at each instant of time. This implies the initial conditions in must now be changed to $$\begin{equation} \qquad p\left(x, 0\right) = \delta\left(x - x_0\right) - \exp\left(- \eta\right)\delta\left(x - m\right),\nonumber \end{equation}$$ where $$\eta$$ determines the strength of the mirror image source. Due to the linearity of the PDE, a solution of this BVP is provided by $$\begin{equation} \qquad p\left(x, t\right) = \phi_{x_0}\left(x, t\right) - \exp\left(- \eta\right)\phi_{m}\left(x, t\right), \tag{1} \end{equation}$$ where $$\eta$$ determines the strength of the mirror image source and $$m > B$$ is the location of this source.

The boundary condition requires for $$x = B$$, $$p\left(x, t\right) = 0$$ for all $$t > 0$$, which yields $$\begin{eqnarray} \nonumber \frac{\left\lbrack x - \mu t - x_0 \right\rbrack^{2}}{2 \sigma^2 t} &=& \eta + \frac{\left\lbrack x - \mu t - m\right\rbrack^{2}}{2 \sigma^2 t} \\ \Leftrightarrow\;\; \left\lbrack x - \mu t - x_0\right\rbrack^{2} &=& 2 \eta \sigma^2 t + \left\lbrack x - \mu t - m\right\rbrack^{2}. \tag{2} \end{eqnarray}$$ Upon substituting $$x = B$$ and $$t = 0$$, we get $$\begin{equation} \left\lbrack B - x_0 \right\rbrack^{2} = \left\lbrack B - m\right\rbrack^{2}\nonumber \end{equation}$$ upon recalling $$m > b$$, we see that $$m = 2 B - x_0$$. Upon resubstituting the value of $$m$$ and $$x = B$$ in equation $$(2)$$ we obtain $$\eta = \frac{2 \mu (x_0 - B)}{\sigma ^2}$$. With these choices of $$m$$ and $$\eta$$, $$(1)$$ gives the solution of the BVP as $$\begin{eqnarray}\label{p(x,t)} p\left(x, t\right) &=& \frac{1}{\sqrt{2\pi \sigma^2 t}}\, \left\{\exp\left[{-\frac{\left\lbrack x - \mu t - x_0\right\rbrack^{2}}{2\sigma^2 t}}\right] - \exp\left[-\frac{2 \mu (x_0 - B)}{\sigma ^2}\right] \exp\left[{-\frac{\left\lbrack x - \mu t - 2 B + x_0\right\rbrack^{2}}{2\sigma^2 t}}\right]\right\}. \end{eqnarray}$$

Under the condition $$B > x_0$$, the survival probability can be obtained as $$\begin{eqnarray}\nonumber S(t) &=& \int_{- \infty}^{b } {p\left(x, t\right){\kern 1pt} \,dx} \\\nonumber &=&\frac{1}{2} \left\{\text{erfc}\left[\frac{-B + x_0 + \mu t}{\sqrt{2} \sigma \sqrt{t}}\right] - \exp\left[\frac{2 \mu (B-x_0)}{\sigma ^2}\right] \text{erfc}\left[\frac{B - x_0 +\mu t}{\sqrt{2} \sigma \sqrt{t}}\right]\right\} \end{eqnarray}$$ where $$\text{erfc}\left(z\right)$$ denotes the complementary error function. The first passage density can now be obtained as $$\begin{eqnarray} f\left(t\right) &=& - \frac{\mbox{d} S\left(t\right)}{\mbox{d}t}\\\nonumber &=& \frac{(B - x_0)}{\sqrt{2 \pi } \sigma t^{3/2}} \exp\left[ -\frac{( x_0 - B + \mu t)^2}{2 \sigma ^2 t}\right]. \end{eqnarray}$$ In particular, a Brownian motion with drift $$\mu$$ reaches the level B with probability one if and only if $$\mu$$ and $$B$$ have the same sign and $$B > x_0$$. If $$\mu$$ and $$B$$ have opposite signs, this density is "defective" in the sense that $$\mathbb{P}\left(\tau_B < \infty\right) < 1$$. The CDF of this density also easily be obtained as $$\begin{eqnarray} \mathbb{P}\left(\tau_B < t\right) &=& \frac{1}{2} \left\{1 + \text{erf}\left[\frac{x_0 - B + \mu t}{\sqrt{2} \sigma \sqrt{t}}\right] + \exp\left[\frac{2 \mu (B - x_0)}{\sigma ^2}\right] \text{erfc}\left[\frac{B - x_0 + \mu t}{\sqrt{2} \sigma \sqrt{t}}\right]\right\}\\ &=& \frac{1}{2}\Phi\left[\frac{x_0 - B + \mu t}{ \sigma \sqrt{t}}\right] + \exp\left[\frac{2 \mu (B - x_0)}{\sigma ^2}\right] \Phi\left[\frac{-B + x_0 - \mu t}{ \sigma \sqrt{t}}\right] \end{eqnarray}$$

• Shouldn't the definition of the passage time be for $X(u) > B$, not $X(u) < B$ given that your barrier is defined to be $B > X_0$? Jan 31, 2019 at 13:01
• @Confounded, yes you are right i had it typed incorrectly, I have revised it, thank you. Feb 8, 2019 at 23:48