First exit time for Brownian motion without drift

I am dealing with the simulation of particles exhibiting Brownian motion without drift, currently by updating the position in given time steps $\Delta t$ by random displacement in each direction drawn from $N(0,k\Delta t)$ (k being a particle-specific constant).

Now, I would rather fix the displacement to a specific value and calculate random numbers representing the time it would take a particle to first travel that far from its previous position (no matter whether that is in the positive or negative direction). What is the appropriate distribution to draw these $\Delta t$ from?

I learned (from wikipedia, since I do not have much of a background here) that for Brownian motion with drift the first passage time follows an Inverse Gaussian distribution and for zero drift a Lévy distribution, but do not see how to arrive at the appropriate parameters. As a test, I generated random numbers from N(0,1) and summed them up until |sum| exceeded some threshold $\alpha$ (I tested 3 to 7). The number of summands needed seemed to be distributed according to an Inverse Gaussian distribution with the parameters roughly following $\mu = \alpha^2+\alpha+1$ and $\lambda = 1.5\alpha^2+2\alpha+1$. I cannot see it matching any Lévy distribution, and it is not intuitively clear to me why the values I am looking for should have an expected value of $\infty$ anyway.

Solutions Collecting From Web of "First exit time for Brownian motion without drift"

My interpretation is that you want to know how long it takes a Brownian motion without drift $B(t)$ to exit $(-\alpha,\alpha)$. This is quite different from the exit time from $(-\infty,\alpha)$ which is discussed in some of the references you mention. I think this is a standard problem, but I’ll just work out some of the properties from first principles.

Let the first exit time be $\tau_\alpha$. The value of $E[\tau_\alpha]$ is easy to determine since $B(t)^2 – t$ is a martingale. $B(\tau_\alpha)^2-\tau_\alpha = \alpha^2 – \tau_\alpha$ so $0=E[\alpha^2 -\tau_\alpha],$ so $E[\tau_\alpha]=\alpha^2$.

We can get the probability density function for $B(t\wedge\tau_\alpha)$ by using the reflection principle, reflecting on $2$ barriers instead of $1$. Count paths ending in each band of width $2\alpha$, $((2k-1)\alpha,(2k+1)\alpha)$ with weight $(-1)^k$. This weighting means that reflecting the Brownian motion the first time you hit $\pm\alpha$ will reverse the sign, so the weights of the paths which hit the barrier at least once cancel. The sum of the weighted densities equals the density of $B(t\wedge \tau_\alpha)$. For $-\alpha \lt y \lt \alpha$ the density of $B(t\wedge\tau_\alpha)$ is $\sum_k \mu_t(y+4k\alpha) – \sum_k \mu_t(-y+(4k-1)\alpha)$ where $\mu_t(x) =\frac{1}{\sqrt{2\pi t}}\exp(\frac{-x^2}{2t})$ is the density of $N(0,t)$ at $x$. This sum can be expressed in terms of theta functions. For $-\alpha \lt y \lt \alpha$, the density of $B(t \wedge \tau_\alpha)$ is

$$\frac {1}{4\alpha} \left( \theta_3\left(\frac{\pi y}{4 \alpha},\exp(\frac{-\pi^2 t}{8 \alpha^2})\right) – \theta_3\left(\frac{\pi}{4} + \frac{\pi y}{4\alpha},\exp(\frac{-\pi^2 t}{8 \alpha^2})\right) \right)$$

The integral of this on $(-\alpha,\alpha)$ gives you the probability that $\tau_\alpha \gt t$. I don’t recall if this simplifies. You can also read off the density of $\tau_\alpha$ from this.

Anyway, for most purposes you don’t need to get the times exactly right, and you may prefer to use a constant time of $\alpha^2$.

If you dig further in Wikipedia then you will find the statement

The time of hitting a single point $\alpha$
(different from the starting point 0)
by the Brownian motion has the Lévy
distribution with $c = \alpha^2$.

though this applies to a standard Wiener process without drift.

It therefore gives a cumulative distribution function

$$ Pr(\tau _a \le t) = \operatorname{erfc} \left( \frac{\alpha}{\sqrt {2t}} \right) = 2 \Phi\left(\frac{-\alpha}{\sqrt {t}} \right)$$

related to the complementary error function and the cumulative distribution of a standard normal.

Added: I had missed that you were looking for the distribution leaving a corridor rather than hitting a single boundary. That makes a big difference as the process cannot head a long way off in the other direction.

This note (top of page 15) states that for a driftless Brownian process starting at $0$ the expected exit time from the corridor $(x_1, x_2)$ with $x_1 < 0 < x_2$ is $-x_1 x_2$. So in your case the expected time is $\alpha^2$. Earlier it gives the more complicated equivalent for a Brownian process with drift.

Wikipedia’s article Wiener process produces the same result when it says

$ W_t^2 – t $ is a martingale, which shows that the quadratic variation of $ W $ on $ [0,t] $is equal to $ t$. It follows that the expected time of first exit of $ W $ from $ (-c,c) $ is equal to $ c^2$.

You should find something similar in your simulations of random walks, that the expected number of steps to first hit $\pm \alpha$ is $\alpha^2$