Hi: I will explain my question through the use of an ant that only walks in one direction and it's horizontal and to the right.

So, assume that I have an ant named slowmo who is sitting at $x = 0$. Deterministically, he walks one unit forward to the right per time unit so that, after $N$ time units ( I'll call them periods from now on ), he would be at $x = N$ if he just walked and no wind was involved.

Of course, wind is involved but it's pretty simple wind. After slowmo walks forward one unit to the right at each new discrete time $i$, a random variable from $N(0, \sigma^2)$ is drawn. This random variable, $\epsilon_{i}$, is the amount that slowmo gets pushed forward ( if its +) or backward ( if its -) by the wind after he stepped forward.

Note that, it is possible that slowmo gets pushed forward so frequently that he ends up traveling through the N unit distance in less than N periods. In this case, we still would call his final landing point $x = N$ and his trip is over in that time it took. On the other hand, if he doesn't reach $x=N$ in $N$ periods, then the trip is also considered over and he stops whereever he stopped. In each case, whether he reaches $x = N$ or not, his final location is referred to $X[N]_{\sigma^2}$ and it is a random variable.

So, to summarize above, I put slowmo at $x = 0$, declare the number of time periods he is allowed to walk forward (one step) as $N$, and, after $N$ time periods have passed, the game is finished. His ending location is denoted as $X[N]_{\sigma^2}$.

My question is: What is the variance of $X[N]_{\sigma^2}$ ?

I think the stochastic process itself is a random walk on the integers with drift and an absorption barrier. So, I first tried googling for "random walk on the integers and absorption barrier" but I couldn't find much on it and definitely not the variance of it.

So, I figured it was not worth it to search for the more complex case where drift due to a deterministic function exists also.

This seems like a problem that some past math genius would have solved at some point but like I said, my searches didn't turn up much.

If anyone knows where there is material on this problem, with or without drift, it's appreciated. Clearly, the drift makes it more complicated but, if I found something about the non-drift case, maybe that could lead to more complicated cases like drift or I could atleast get some approximation.

At the same time, although I have no clue, if someone knows how to solve this themself, that would of course be appreciated also. I really don't know how difficult this is but it's beyond my general capabilities for sure. Thanks for the help. Also, if this is not the right stackexchange site to send to, let me know if I should send it to say the math one instead.


Firstly, this is very normal fare for Stochastics which studies properties of such processes. So if you're not finding anything, look up any stochastics textbook.

One thing that is not clear from your explanation is what $X[N]$ is when Slowmo reached the boundary early. Does $X$ continue to evolve, or does it stop? It makes a difference because if he can continue walking then there are a lot of larger values that would be possible and would contribute to the variance.

Essentially you are asking for the variance of the final position after $N$ steps; the drift is a distraction here as the expected position is always $N\pm \mathrm{something}$; it would be equivalent to starting at $N$ and then evolving a series of random steps without drift.

The variance of the sum of independent random variables (i.e. each random step) is the sum of the variance of each variable:

$$\mathrm{Var}\left(\sum_{i=1}^{i=N} W_i \right) = \sum_{i=1}^{i=N} \mathrm{Var}\left(W_i \right)$$

In this case the variables are distributed with mean 0 and variance $\sigma$, so the variance of a sum of $N$ such variables:

$$\mathrm{Var}\left(\sum_{i=1}^{i=N} W_i \right) = \sum_{i=1}^{i=N} \sigma^2 = N \sigma^2 $$


The wrinkle here is this notion of absorption, which would suggest you mean the value ceases changing once the barrier is met. So all the scenarios where Slowmo would reach values $X>N$ are absorbed into the result $X=N$.

In this construction, it no longer makes sense to talk about the variance as the sum of the variance of the steps, because some of those steps may not even happen. Consider where after 1 step, with some miniscule probability, Slowmo reaches $N$. The remaining $N-1$ steps do not happen, so how are you going to account for their variance?

It also means that the expected value is no longer $N$. Previously every chunk of probability for a value below N was matched by a symmetric piece above N, leaving N as the expected value. But now no values are above $N$, so the expected value is below $N$.

To illustrate, in a quick spreadsheet I have calculated the mean and variance of a series of runs with and without absorption:

           Mean   Var
Unbounded  ~6     ~0.28
Absorbing  ~5.8   ~0.1

With a stdev for each step of 0.2, and with all values over 6 bounded to exactly 6, and all paths reaching 6 terminating early.

So what would the revised variance look like? It will be lower than that of the unbounded process, because essentially the whole of the right-hand tail of the distribution has been removed. This then starts to look like the Half-normal distribution, whose variance is $1-2/\pi \approx 0.36$ that of the equivalent Normal.

And in the test sheet, the variance of the bounded results is around a third of the unbounded one - there is an added element from stopping early which will depend on the standard deviation value itself as small std deviations are less likely to terminate early than larger values; indeed with a stdev of 1e-10 for each step I get a ratio of 0.35, and with a stdev of 100 (i.e. the barrier is ~0) the ratio is 0.27.

Similar options

As it standard, the model looks like an option on the position of Slowmo. Specifically, if the payoff is $X[N]$, then we have an option with value positively correlated with the underlying, up to a barrier at value $N$. A more realistic version would apply some exponential drift rather than a linear one, and have a geometric rather than linear brownian motion; i.e. the scale of the random motion would be relative rather than absolute.

For further reading, I would recommend reading about Stochastics and barrier options, and putting some test numbers through a spreadsheet.

  • $\begingroup$ This looks great. I will read carefully either today or definitely tomorrow and then put a check. $\endgroup$ – mark leeds Sep 3 '18 at 15:01
  • $\begingroup$ This was great. A couple of things. 1) Slowmo's journey is over once he hits $x=N$ or the end of $N$ periods, whichever happens first. 2) Simulation is a great idea. But are you saying that there is no closed form for the variance of the ending position even in the case of wind and no walking ? For example, Slowmo starts at x = 0 and is only moved by the wind with N = 10 periods, $\sigma^2 = 0.5$ and his journey stops when he hits say x = 1.0 say or N = 10 periods. Is there no closed form solution for variance of ending position even for that case ? Thanks. $\endgroup$ – mark leeds Sep 3 '18 at 22:17
  • $\begingroup$ Simulating Slowmo's movement ( with walking included ) was much easier than I expected and mostly due to the powers of R. So, thanks for the great suggestion. For given values of $\sigma^2$ and $N$, I can generate a large number of simulations quickly and therefore obtain estimates of the distribution of the ending location ( mean and variance ) and plots of the distribution itself. If I find out anything about closed form solutions, I will let you know but it looks like I don't even need them. Thanks and all the best. $\endgroup$ – mark leeds Sep 4 '18 at 18:05
  • $\begingroup$ Just an update: I went through some literature and the texbook suggested by @Whuber. Yes, the absorbing barrier framework for brownian motion is DEFINITELY a popular topic in stochastic processes, But, as far as I can tell, the variance in my problem has no closed form solution and simulation is the only way of obtaining it. But simulating wasn't difficult so the answer from Phil H was quite useful. Thanks to all. $\endgroup$ – mark leeds Oct 7 '18 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.