# Diffusion coefficient for asymmetric (biased) random walk

I want to obtain a Fokker-Planck like equation by taking the continuous limit of a discrete asymmetric random walk. Let the probability of taking a step to the right be $p$, and the probability of taking a step to the left be $q$, with $p+q=1$. Let each step be of length $\Delta x$, and occur in time $\Delta t$. Let $P(x,t)$ be the probability of finding a particle at position $x$ and time $t$.

$$P(x,t+\Delta t) = p P(x-\Delta x,t) + q P(x+\Delta x,t)$$ $$P(x,t+\Delta t)-P(x,t) = p[P(x-\Delta x,t)-P(x,t)] - q[P(x+\Delta x,t)-P(x,t)]$$

If we divide both sides by $\Delta t$ and take a limit of $\Delta t\to 0$, we'll get $$\partial_t P(x,t) = (p/\Delta t)[P(x-\Delta x,t)-P(x,t)] - (q/\Delta t)[P(x+\Delta x,t)-P(x,t)]$$ Now, if I expand the RHS to second order in $\Delta x$, i.e. I write $$P(x\pm\Delta x,t) = P(x,t) \pm \Delta x\partial_x P(x,t) + (1/2)\Delta x^2 \partial^2_x P(x,t),$$ this gives

$$\partial_t P(x,t) = -v\partial_x P(x,t) + D \partial_x^2 P(x,t)$$ with $v=(q-p)\Delta x/\Delta t$ and $D=\Delta x^2/2\Delta t$

Now while the expression for $v$ makes sense, the expression for the diffusion coefficient $D$ cannot be correct! It is independent of both $p$ and $q$. Trivially, if $p=1$ and $q=0$ (or vice versa), there should be no diffusion and $D$ should be zero. In fact other arguments of variance of the particle's position etc. do suggest that $D \sim pq$.

What seems to be going wrong here?

• Why wouldn't a not-so-random walk not diffuse? Mar 23, 2016 at 11:25
• Because in the case of $p=1$, we can see that microscopically at every step the particle will just take one step to the right. Which would mean that the distribution will not change its shape at all, i.e. $D$ must be zero. (If you set $D=0$ in the FP equation, then you just get the equation of a wave moving in one direction, which is what it should be if the entire distribution just shifts by one at each time step) Mar 23, 2016 at 15:16
• I see. Well looking around in some books and resources online, it seems that D is independent of p and q. Mar 23, 2016 at 15:47
• Could you give me any sources? Because I've found some sources that give the Diffusion constant as $2pq$. Mar 23, 2016 at 18:28
• Lecture notes I found here: tinyurl.com/jb38fto for instance. Mar 23, 2016 at 18:32

PREFACE

After several edits, this answer provides a naive explanation of why your approach failed, how to fix it (naive-ish) and a completely different (but right) approach to solve the problem.

Intro

You are right: the diffusion coefficient should be $$D=4pqD_0$$, $$D_0$$ being the "normal one" (see below for derivations).

I do not know precisely why your approach is not working, but there is a strong evidence something must be wrong which I think depends on the stochastic process involved: if you define $${\Delta x\over \Delta t}=v$$ and it is finite, then "your" $$D={\Delta x^2 \over 2\Delta t}={\Delta x\over 2} v$$ is vanishing in the small $$\Delta x$$ limit.

The fact is that on the LHS you have a time derivative ($$O(\Delta t)$$) whereas on the RHS you have a second $$x$$-derivative ($$O(\Delta x^2)$$).

Now, since the ratio $$v={\Delta x\over \Delta t}$$ is finite, it means that $$O(\Delta x^2)=O(\Delta t^2)$$ so the two sides of the equation do not match. With normal Brownian motion, you would have $$\Delta x\sim \sqrt{\Delta t}$$ so no problem.

Basically the drift induced by the bias messes things up...

I am disappointed to see that soooo many books and papers do this mistake and use $$D_0$$ also for biased random walks... (it only makes sense when the bias is external and diffusion is the "normal" one, while in this case it's the same process..)

I now propose you two solutions: the first one is a Fokker-Planck approach. The second one is a Langevin one.

I am sure the results are right (simulations + papers + books prove it) but I am not sure about the steps (as I mainly did them myself). It is hard to find a theoretical treatment of this matter.

Fokker-Planck approach

The problem we are facing here is drift+diffusion: the particle drifts (due to the bias) but also oscillates around its mean value (as normal diffusion would oscillate around $$0$$).

We define the drift velocity (taking only a "fraction" $$p-q$$ of the displacement) as $$v=(p-1){\Delta x\over \Delta t}$$. If we had only drift the FP would be: $$\partial_t P_d(x, t)=-v\partial_x P_d$$

Instead if we had only diffusion: $$\partial_t P_D(x, t)=D\partial^2_x P_D$$

Problem: which D do I choose? In general $$D\sim \Delta x^2$$ but in our case "a fraction" $$(p-q)\Delta x$$ of the original displacement has been turned to drift, so we renormalize by removing this part (this is equivalent to consider only the variance of the displacement instead that its squared mean value, which again, in normal diffusion are identical so...): $$D={1\over 2\Delta t}\left(\Delta x^2 - (p-q)^2\Delta x^2\right) = 4pq{\Delta x^2\over 2\Delta t}$$ (I used $$p+q=1\rightarrow p^2+q^2=1-2pq$$).

As you see we found the $$D$$ I predicted - yet this has been sort of a leap of faith for me, although I see that the diffusion coefficient is sometimes defined as $${var(\Delta x)\over 2\Delta t}={\langle \Delta x^2\rangle - \langle \Delta x\rangle ^2)\over 2\Delta t}$$ instead of simply $${\langle\Delta x^2\rangle\over 2\Delta t}$$. I never noticed that because in normal diffusion there is no difference as the mean is null.

Anyway, the two processes by themselves are perfectly defined.

We now have to stitch together drift and diffusion. Since the two process happen at the same time, the final probability $$P(x, t)$$ can be found as:

$$P(x, t)=\int P_D(x-y)P_d(y)dy$$ (meaning: probability of travelling $$x-y$$ by diffusion times probability of travelling $$y$$ by drift, integrated over $$y$$). Again, this is a leap of faith and so is the proof (which I think I managed to find, but wouldn't be sure of it: one just has to take the time derivative of that stuff and the play with the integrals and derivatives a little...) that this leads to:

$$\partial_t P= -v\partial_x P +{D}\partial^2_x P$$ which is the Fokker-Planck we are looking for, with $$D=4pqD_0$$.

Langevin approach

One of the sources you quoted in a comment already show the following, but I am doing it in a more physical fashion.

I am not sure it can help but I propose you a similar approach (more Langevin-like) which leads to the first two moments of the position $$x$$ and to an evident definition of the diffusion coefficient.

We suppose a discrete process of $$N={t\over \Delta t}$$ steps, there $$t$$ is the total time. At each step, the particles displaces by $$\Delta$$ with probability $$p$$ to the right and $$q=1-p$$ to the left.

Thus at each step: $$x(t+\Delta t)=x(t)+\eta_{\Delta t}$$

where $$\eta_{\Delta t}$$ is a process which gives $$\Delta$$ with probability $$p$$ and $$-\Delta$$ with probability $$q$$, such that $$\langle \eta_{\Delta t }\rangle = (p-q)\Delta$$ and $$\eta_{\Delta t}^2=\Delta^2$$. Notice that this defines $$\eta_{\Delta t}$$ only each $$\Delta t$$ seconds. We do not know what happens at other scales.

So we have, after $$\Delta t$$: $$dx=x(t+\Delta t)-x(t)=\eta_{\Delta t}$$ and thus its average value is:

$$\langle dx \rangle=\langle \eta_{\Delta t} \rangle=(p-q)\Delta$$ so that $$\langle x(t)-x(0) \rangle=\langle \sum^N_{i=1} x(i\Delta t)-x((i-1)\Delta t)\rangle=\sum_{i=1}^N \langle dx\rangle=N(p-q)\Delta=(p-q){\Delta \over \Delta t}t$$

If again we put $$v={(p-q)\Delta \over \Delta t}$$ this is your same result and it makes sense. Notice that we had to split $$x(t)-x(0)$$ in $$\Delta t$$-sized interval as we do not know what happens on other scales.

Things are harder for the second moment: $$\langle (x(t)-x(0))^2 \rangle=\langle\left(\sum^N_{i=1} x(i\Delta t)-x((i-1)\Delta t)\right)^2\rangle=\langle\left(\sum^N_{i=1} dx\right)^2$$

and that is the square of a sum, so:

$$\langle\left(\sum^N_{i=1} dx\right)^2\rangle=\sum^N_{i=1}\langle dx^2\rangle + 2\sum^N_{i

now, using the moments of $$dx$$ which we know, being that all moments are equal:

$$\langle (x(t)-x(0))^2 \rangle=N\langle dx^2\rangle+N(N-1)\langle dx \rangle ^2$$ i.e.

$$\langle (x(t)-x(0))^2 \rangle = \Delta^2 N(1+(N-1)(p-q)^2)$$

which can be modified into (using $$p+q=1\rightarrow p^2+q^2=1-2pq$$):

$$\langle (x(t)-x(0))^2 \rangle = \Delta^2{t\over \Delta t} \left((1-4pq){t\over \Delta t}+4pq)\right)$$

which we can rewrite as

$$\langle (x(t)-x(0))^2 \rangle = \Delta^2{t\over \Delta t} \left( ((p-q)^2-2pq){t\over \Delta t}+4pq)\right)$$ and using $$v=(p-q)\Delta/\Delta t$$ we get

$$\langle (x(t)-x(0))^2 \rangle = (vt)^2(1-2pq)+{4pq\Delta^2\over\Delta t} t$$

Now, if $$p=q=1/2$$ you get $$\langle (x(t)-x(0))^2 \rangle = \Delta^2{t\over \Delta t} = 2Dt$$ with $$D={\Delta^2\over 2\Delta t}$$ which is normal diffusion, as expected.

If instead $$p=1$$ and $$q=0$$ (or vice versa)

$$\langle (x(t)-x(0))^2 \rangle = \Delta^2\left({t\over \Delta t}\right)^2 = (vt)^2$$

which again is surely right.

All the intermediate cases are weird. Notice, in addition, that in all other cases if you let $$\Delta t, \Delta \rightarrow 0$$ strange things happen.

I guess this is the reson the Fokker-Planck does not turn out right except for simple cases. There must be some "stochastic processes" trick I do now know.

But at least you can rewrite:

$$\langle (x(t)-x(0))^2 \rangle = \Delta^2\left({t\over \Delta t}\right)^2 (1-4pq)+4pq\Delta^2{t\over \Delta t} = (vt)^2(1-2pq)+2D_{eff}t$$ with $$D_{eff}=4pq{\Delta^2\over2\Delta t}$$ and that extra $$(1-2pq)$$ term I don't fully understand.

This process is a drift+diffusion process: the particle drifts with velocity $$(p-q)vt$$ (which is the position's average value) and around such a value it oscillates. At each time one can compute the variance:

$$\sigma^2=\langle (x(t)-x(0))^2 \rangle -\langle (x(t)-x(0)) \rangle ^2$$ which turns out to be

$$\sigma^2(t) = 2D_{eff}t = 8pqD_0t$$ where $$D_0={\Delta^2 \over 2\Delta t}$$ is the normal diffusion coefficient.

So I guess the process will be represented by a gaussian distribution (provided that we started with $$P(x, 0)=\delta(x-x_0)$$ with mean $$x0+(p-q)vt$$ and variance $$\sigma^2(t)$$. So the distribution moves and spreads.

Simulations I have been doing right now are in agreement.

Conclusions

I am not sure we found the right Fokker-Planck (or that we found it the right way) but I guess we found $$P(x, t)$$...! This P(x, t) makes sense and is probably the right one. Yet, as simulations always involve discrete steps, I am not sure about what would happen in the continuous limit though... maybe the validity of some steps may fall apart.

Yet, I think we may consider ourselves satisfied.

• Edited to answer the question more thouroughly. Nov 8, 2016 at 1:32
• +1 I don't know if the answer is right, but this is excellent analysis. Learnt a lot by reading your answer. Thanks.
– Deep
Nov 8, 2016 at 5:23
• A very interesting and insightful answer. Thanks. A few questions still remain here and there, but this certainly explains things to a point where I'm going to have to think about this problem all over again. Nov 17, 2016 at 22:11
• The fact is that your original approach only works when drift or diffusion act separately. Otherwise you need higher orders.. Nov 19, 2016 at 19:28
• This answer confuses me given the notation in the OP... $v=\Delta x/\Delta t$ doesn't make sense; $\Delta x$ is the unit length of the grid, and $\Delta t$ is the unit of time for a step to occur. There is no reason for a concept of drift velocity to always be $\Delta x/\Delta t$. Furthermore, you have just "passed the buck" to the velocity now, as now you have a velocity that is independent of $p$ and $q$. Jan 10 at 21:48

The equation that you are describing is known as the Langevin equation in and it's corresponding Fokker-Plank equation. The main problem with the diffusion equation is that $p$ may not be 1 and $q$ be 0, but there is a linking equation needed (as in the Ito framework):

$$\Delta h = const \sqrt{\Delta t} \\$$

for this you need

$$p - q = \frac{\alpha}{\sigma} \sqrt{\Delta t} \\$$

where $\alpha$ is the term in Ito equation

$$dX = \alpha dt + \sigma dZ$$

Now according to this journal

anomalous diffusion properties have been extensively investigated by several approaches in order to model different kinds of probability distributions The wellestablished property of the normal diffusion described by the Gaussian distribution can be obtained by the usual Fokker-Planck equation with a constant diffusion coefficient (without the drift term). Anomalous diffusion regimes can also be obtained by the usual Fokker-Planck equation, however, they arise from variable diffusion coefficient which depends on time and/or space. On the other hand, in the view of Langevin approach it is associated with a multiplicative noise term. In other approaches such as the generalized Fokker-Planck equation (nonlinear) and fractional equations, they can describe anomalous diffusion regimes with a constant diffusion coefficient. The Langevin equation is a very important tool for describing systems out of equilibrium [3, 4]. Moreover, this equation has been extensively investigated; many properties and analytical solutions of it have also been revealed. In this work, we present solutions of a class of the Langevin equation with the deterministic drift and multiplicative noise terms in time and space. To do so, we obtain the corresponding Fokker-Planck equation in the Stratonovich definition, and then we obtain its solutions for the probability distribution function (PDF).

Now according to the Langevin equation

$$\xi = h (\xi, t) + g(\xi, t) \Gamma(t)\\$$

where $\xi$ is a stochastic variable and $\Gamma(t)$ is the Langevin force. For $g = \sqrt{D}$ and $h(\xi, t) = 0$ we get describes the Wiener process and the corresponding probability distribution is described by a Gaussian function. By applying the Stratonovich approach in a one-dimensional space of the Langevin equation, we obtain the following dynamic equation for the SDE (rewriting it in better notations):

$$\partial_t P(x,t) = -D_1 \partial_x P(x,t) + D_2 \partial_x^2 P(x,t)$$

where using Stratonovich approach

$$D_1(x,t) + \frac{\partial g(x,t)}{\partial x} g(x,t)$$

and

$$D_2 (x,t) = g^2 (x,t)$$

• Thanks for the answer. However, the O.P's main question is to understand why the approach outlined in the question fails. Can you clarify this point? Apr 2, 2016 at 22:39
• So how does $g(\xi,t)$ relate to $p$ and $q$ of the microscopic problem that was initially defined? Further, do you have any insight regarding why what I was doing was incorrect? Apr 2, 2016 at 22:40

It is important to make the difference in concept between the diffusion and displacement. It is up to you to decide how your diffusion coefficient should behave and see if it can mimic a physical situation.

Your equations can describe a reality.

Consider a glass of water that you drop from a third floor building. If you assume no wind, your water molecules will sooner or later fall down to the street, but your liquid will spread through space vertically for reasons we do not need to care about but do exist (in this case air friction). You will most likely agree that in this realistic scenario you will find molecules in the liquid which have a velocity lower than the v, where v is the velocity averaged over all molecules. This is because of D which in this case describes the spread in momentum/position.

You could imagine the same experiment with the single molecules dropped one by one from the balcony. You will find that on average your velocity is v but not all particles arrive at the same time, and the spread will be given by D, and D will not be zero.