- One dimensional Random Walks (discrete space and time)
- Brownian Movement (continuous time and space)
Random Walks in Biology
Most molecules inside a cell are subject to thermal fluctuations. Organells inside a cell are also in constant motion. Cells (such as bacterial colonies) also interact with each other in aqueous environments and are subject to constant movement. This week, we are going to describe the basic mathematical rules that control this type of thermal random movement.
One dimensional Random Walks (discrete space and time)
The concept of random walk was first introduced by Karl Pearson in 1905, and he used random walks to describe how mosquito could infests a forest. At about the same time, Albert Einstein introduced Brownian movement to describe the movement of a particle of dust in the air.
This situation is the simplest possible example of a diffusion problem. Particles start at time and position . Particles move according to the following rules:
Each particle moves after a fixed step time a fixed step distance to the left or to the right.
Each particle steps left or right with probabilities and respectively.
Particles move independently from each other.
In Figure 1, I show a simulation for 10 particles for different values of the Bernoulli parameter of stepping into the left. All particles start at time in position .
Figure 1. Five examples of 10 particles performing 1D random walks under different Bernoulli parameters.
The probability distribution
After time (or steps), a given particle, will be at a position . The probability distribution for one particle to be at position after steps follows a binomial distribution.
If we assume that the particle moved steps to the left (and steps to the right), then we have
Using the relationships,
The probability of the particle finding itself at position () after wandering for steps () is
Figure 2. Three examples of 500 particles performing 1D random walks under different Bernoulli parameters. Top p= 0.4, middle p = 0.5, bottom p = 0.6. For each condition, in the right panels, we display the probability distribution for the displacement at different steps values n = 100, 1,000, 10,000, and 1000,000.
The mean position is proportional to the number of steps (the elapsed time)
The mean of can be calculated as
And remembering that for a binomial distribution , then
That is, the mean is proportional to the number of steps.
For the particular case that , there is no net displacement. As we can observe for the middle graph in Figure 1. When , we say that the random walk has no drift.
The standard deviation of the displacement is proportional to the square root of the elapsed time.
The variance of can be calculated easily by remembering that , as
Then, the standard deviation is given by
Thus, the standard deviation grows with the square root of the elapsed time (). We can observe such behavior in Figure 2.
Figure 3. The difference equation satisfied by the probability of finding a particle at position m, after time N.
Very small particles that can take a very large number of steps per second (lysozymes in a cell is a good example). In that case, where
the Binomial distribution (by the central limit theorem) approximates a Gaussian distribution, with mean and standard deviation given by
That is for very large,
Where is the probability of a particle moving from m to , where is very small.
In Figure 2, I show several examples with a large number of trajectories, where we observe the behavior of a 1D random walk, and the fit to the Gaussian approximation.
The random walk has no memory. The next position depends only on where we are, not on how we got there. That is, it is a Markovian process.
The probability satisfies the equation (see Figure 3).
This is known as the master equation of the diffusion stochastic process.
Random walk with drunken pauses
A slight modification of the process can be achieve if we assume that and that the sytem “does nothing” with probability . This is called a random walk with drunken pauses. The master equation with drunken pauses is given by
In this case, if is the number of left movement, and is the number of steps with no movement the net displacement to the right is given by the number of moves to the right minus the number of movements to the left ,
The mean value of the displacement is given by
the same as in the case with no drunken pauses.
An the standard deviation of the displacement is given by
The probability of capture
A random walk starts at , what is the probability that it reaches a given position ? (Figure 4).
Figure 4. For a 1D random walk, probability of starting at point 0, and reaching another point i > 0.
We are going to use the Markov equation to solve this question.
Lets name such probability . We are going to assume that the particle is in a large media, and there is not risk of reaching any boundary, that is
According to the Markov equation,
To find the form of , let’s make an ansatz of the solution. I propose
The no boundary condition is satisfied if
Then we have
Because the particle is at position zero, trivially , then .
Then we have
Using the Markov equation we can determine the value of
or multiplying by
which can be written as the second order equation
The solutions are
- For , the particle will always reach position
- Even for , there is a chance of reaching , given by .
- In the particular case (an unbiased random walk), position is always eventually reached.
This mathematical framework applies for problems such as
A very small population of individuals, where birth has probability and death has probability . Even if there is no net growth (), the population can reach a given size with probability .
A gambler with no capital, where is the probability of winning. Even if there is a chance of winning amount of money by probability .
Reciprocally, if starting at position , the probability of reaching is (see Figure 4)
A population of size , even with a net growth rate , there is a chance of extinction given by .
A gambler with a capital , where is the probability of winning. Even if there is a chance of loosing all money given by .
Time to capture (hitting times)
Ok, so a population can grow to an arbitrary large size even if there is not net growth, but how long would that take?
The expected time it would take to go in a random walk from position to position is called a hitting time .
Using the Markov recursion again
Using the ansatz,
remembering that ,
The final result for the hitting time is
This expression for hitting times tells us
- In general, hitting times are not symmetric.
- For an unbiased random walk (), it would take infinite time to return to the origin.
- For a population of size , the time it would take to reach extinction is proportional so the size of the population.
The answer to our leading questions: how long it would take to a population to grow to a given size when there is no positive growth, birth rate () < death rate () is:
- Time is proportional to the size .
- Time is inversely proportional to
- It would take infinite time if the rates of birth and death are identical.
2D Random Walks
The assumptions of a 1D random walk can be generalized for two or three dimensions. If we further assume that the movements in the x and y directions are independent from each other, and that each movement occurs simultaneously in both directions, so the movement is always diagonal, then we can simulate a 2D random walk, as described in Figure 5.
Figure 5. Sampled two dimensional random walks with N= 50,000 steps each and no drift (p=q).
In Figure 5, we observe an important property of random walks: because it takes a shorter time to explore closer regions, the particle tends to explore proximal regions, before exploring more distant regions. After one rarer event of wandering away, it process to do more local explorations. Because the random walk has no memory, there is never a knowledge of what has or has not been explored in the past.
Brownian Movement (continuous time and space)
Brownian movement is named after the botanist Robert Brown, who in 1827 observed the movement of particles trapped inside pollen grains. Brownian motion refers to the macroscopic picture that emerges from a random walk.
For a lysozymes, we have the following approximate parameters
This is a considerable speed. At that speed, the lysozyme would ran a marathon in 1.3 hours. The lysozyme takes steps per second.
When you take the limit , then a random walk becomes Brownian movement.
We assume no drift for the movement of lysozymes, and that the particle is at position zero at time zero.
The mean displacement of each molecule at time is
And the variance (or mean-square displacement) ( and )
We introduce a new variable the Diffusion coefficient
The diffusion coefficient characterizes how a particular type of particles wanders (migrated). It depends on properties of the particle such as size, as well as on external ones such as the structure of the media, and the temperature of the media.
Then, the variance is given by
and the mean-square deviation of the displacement is
And using the Gaussian approximation, the probability of finding the particle at position at time is
This result generalizes for two and three dimensions. Movement in each direction is independent from each other, which results in
Introducing in 2D and in 3D, we have
How fast is Brownian motion?
Well, it depends on how much time you have been wandering. While the mean displacement is zero, the mean squared displacement grows with time.
For the lysozyme particles, the Diffusion coefficient takes the value
This is a standard value for small particles. Here are some examples of the obtained at different times
|1||cm||size of a bacterium|
|1 ms||cm||size of a neuron’s cell body|
|8 min||0.1 mm||length of a neuron’s dendrite|
|6 days||1 cm||length of a neuron’s axon|
In Brownian motion, the mean-square deviation of the displacement grows with the square-root of the time. There is not such thing as a “Diffusion velocity”.
The Diffusion Equations
The diffusion equations describe the macroscopic behavior of a random walk when both time and space are continuous variables. The diffusion equations are also referred to as Fick’s equations.
We are going to derive the diffusion equations in two different ways. We assume a random walk process in which .
Using the Markovian condition introduced above, we can rewrite
then taking the continuous limit , the above equation becomes a differential equation
which result in the diffusion equation
where is the diffusion coefficient.
Let’s also look at a more intuitive derivation given by Berg in Chapter 2.
Figure 6. Diffusion for an unbiased random walk. At time t there are N(i) particles at position i and N(i+1) at position i+1. At the next step, half of the N(i) particles have move right to i+1 and half of the N(i+1) particles have moved left to i.
At time , there are in between i and i+1, and particles between and . At time , there has been a flux of particles, such that half of the particles have moved to , and half of the particles have moved left to . The net flux of particles from to , named is given by
Equivalently, the change in the number of particles at position between times and is given by the particles that left plus the particles that arrived
Flux, or particles crossing per unit of time at a given position
Concentration, or particles per unit length at a given position
Then the first equation can be re-written as
This result is known as the first Fick equation. It says that the net flux is proportional to the change in concentration. The proportionality constant is the diffusion coefficient .
Then the second equation can be re-written as
Multiplying by ,
which in continuous form becomes
This result is known as the second Fick equation. It says that a nonuniform distribution of particles in space, will redistribute itself in time.
Combining the two equations together we get to what we have seen before, that relates the changes in concentration with respect to time, with those respect to position
Some particular solutions
In order to find solutions for the diffusion differential equations, we need to provide some initialization conditions.
Here I present handful of interesting ones.
Initial condition is a pulse
If we assume that particles enter the media at time , at position , that is
then the solution to the diffusion equation (in 1D) is Gaussian,
I am not going to show how to obtain this result (easier way is by doing a Fourier transform), but you can verify that this solution indeed satisfies the diffusion equation.
We had obtained this result before, when looking at the microscopic random walks for large . If you think about it (Figure 1), we where injecting independent particles as a given position, at time zero, just the initial conditions we proposed here.
This initial condition applies for instance to a micropipette filled with fluid to which one injects a drop of a fluorescent dye. tells us how the dye diffuses along the pipette with time.
The concentration remains highest at the tip (point of injection) as time goes by.
But, the actual concentration decays with the square root of the time (if the problem is in one dimension) or with in 3D. This is a pretty fast decay!
You observe this behavior in the right middle panel of Figure 2 where we plot the concentration as a function of position for different times. The Gaussian is always center at , but the size of the peak decreases with time (or number of steps).
Absorption and Reflection
Figure 7. 1D unbiased random walks (100) with absorption at position x = -15 and reflection at position x = 15.
So far, we have assumed particles come from one source, and can move freely with no physical constraints. That is not normally the case.
- A surface at position that absorbs particles is characterized by
- A surface the reflects particles is characterized by
Steady-state solutions are those for which the concentration does not depend on time
Steady state solutions in one dimension include
Figure 8. 1D steady-state Diffusion.
The concentration is constant:
which results in no flux
The concentration is linear with distance
Then the flux is constant