EXPLORABLES

by Dirk Brockmann

This explorable illustrates the geometric and dynamic properties of the physical process of diffusion and its intimate relation to a mathematical object known as a random walk. It also illustrates graphically the implications of the central limit theorem that explains why we so often (normally) observe Gaussian distributions in nature. In the context of random walks this means that in the long run and from a great distance the paths of different types of walks become statistically indistiguishable.

Press Play and keep on reading….

This is how it works

A random walker starts at the origin $ \mathbf{r} _0 = 0$. At every time step $n=1,2,3,…$ the walker moves a random displacement $\Delta \mathbf{r} _n$ away from its current position, so $ \mathbf{r} _{n} = \mathbf{r} _{n-1} + \Delta \mathbf{r} _{n}$. After $N$ steps the position is therefore the sum of all individual displacements:

$$ \mathbf{r} _{N} = \sum _{n=1} ^{N} \Delta \mathbf{r} _{n} $$

Although we are discussing two-dimensional walks here (displacements and positions have $x$- and $y$-components) most of what follows is true in any dimension. Because the displacements are random, the position after $N$ steps and the entire path are random, too. We assume here that

  • i) the displacements are statistically independent,
  • ii) their expectation value vanishes ($\left< \Delta \mathbf{r}_n \right>=0$), and
  • iii) displacements have a characteristic length $\sigma$ defined by the variance $\sigma = \sqrt{\left< \Delta \mathbf{r}_n^2 \right>}$.

The explorable generates collections of paths (you can pick 1, 5, or 25 paths per collection) of four different types of random walks. The types differ in the way displacements are chosen as the walks are generated. This is indicated in the little insets on the right that depict the two-dimensional probability distributions for the displacements of the walk:

  • The N-W-S-E-walk performs a step of length $\sigma$ in one of four directions $(\Delta x,\Delta y)=(\sigma,0)$, $(-\sigma,0)$, $(0,\sigma)$ or $(0,-\sigma$) with equal probability.

  • The Ring-walk takes a step of length $\sigma$ in any direction with uniform probability.

  • The Triangular-walk picks three different directions at multiples of $120^\circ $ angles.

  • The Gaussian-walk draws displacements from a two-dimensional normal distribution, displacements can have variable length here but the typical length is $\sigma$ as in the other cases.

The position of each walker is indicated by a black dot, the path in the corresponding color is recorded as well, each can be switched on/off.

Observe this

Restart the system by pressing the Back button and press Play again.

Inititally, you can see geometric differences between the paths of the types of walks. As time proceeds and we zoom out (automatically, to make things fit) the differences in the geometry of the paths of different types are more and more difficult to discern. In fact, as time goes on the total displacement from the origin of all walkers and the coarse grained geometry of their paths become statistically indistiguishable. We can no longer identify which type generated what path. The mathematical foundation here is the ….

The central limit theorem

This theorem has something to say about sums of random variables. We discuss a simple version of it here. Let’s say we have $N$ independent random variable $X_n$ that are all drawn from a probability density function $p(x)$. For simplicity we say that the expectation value of the random variables exists and is zero. We also assume a finite variance of $\sigma^2$. Mathematically,

$$ \int dx ,x, p(x) = 0\quad\text{and}\quad\int dx ,x^2, p(x) = \sigma^2. $$

Now we would like to know the properties of the sum $Y_N=\sum _n^N X_n$. The central limit theorem states, in this particular case, that the probability density function $p_N(z)$ of the scaled variable

$$ Z_N=\frac {Y_N}{\sigma\sqrt{N}} $$

approaches the normal distribution:

$$ \lim_{N\rightarrow\infty}p_N(z)=\frac{1}{\sqrt{2\pi}}e^{x^2/2}. $$

In words we can say that the sum $X_n$ scales with $\sigma\sqrt{N}$ and follows a Gaussian distribution. The scaling with $N$ implies that if a random walker moves around for $N$ steps and we compute the expected radial distance to the origin, we would have to wait 4 times as long in order to double that distance.


Related Explorables:

Anomalous Itinerary

Lévy flights

Anomalous Itinerary

Lévy flights

Hopfed Turingles

Pattern Formation in a simple reaction-diffusion system

Kelp!!!

A stochastic cellular automaton

Particularly Stuck

Diffusion Limited Aggregation

Particularly Stuck

Diffusion Limited Aggregation