Having mentioned the connection between diffusion and random walks several times so far, we will now substantiate these claims. We will again adopt the example of a drop of milk in a cup of tea, in which we have a sufficiently large number of particles (milk) moving in solution. The goal will be to calculate the spatial distribution of these particles as a function of time. In our discussion of random walkers up to now we have concentrated on the description of individual particles, i.e. walkers. An alternative way to describe the same physics is provided by the density of particles, ρ(x,y,z;t), which can be conveniently defined if enough particles are present. This idea can be reformulated such that sub-volumes of the original volume are considered, allowing us to count the number of particles in each sub-volume, identifying this as the respective density. This method goes under the name of coarse graining. It basically centres around considering regions of the physical volume that are large enough to allow for a meaningful definition of density as number of particles per volume element, i.e per sub-volume.
This density is then proportional to the probability of finding a particle, P(x,y,z;t), per unit volume and time at the corresponding coordinates. Thus ρ and P essentially describe the same physics and obey the same equations. It is therefore sufficient to consider probabilities P.
To find the underlying equations, let us focus on an individual walker. We assume that it walks on a cubic lattice, with walking steps along each of the three dimensions x, y, and z with unit size. Thus the walker essentially hops from lattice point to lattice point.Then P(i,j,k;n) is the probability to find the walker on the link with coordinates (x,y,z) = Δx(i,j,k) at a time (step) n, if the size of the lattice spacing is Δx. Since we are on a simple cubic lattice, there are typically 6 different possible steps, one for each neighbouring site. If the walker in on one of those steps at a time n-1 then the probability to be at (i,j,k) at time n reads
Due to the link between probabilities and densities, the particle density obeys the same diffusion equation:
Phrased in another way: A disturbance, like the milk drop, will spread out over a distance √(2Dτ) during a time τ, or equivalently: it will take a time l²/(2D) to spread out over a dimension l. This can be seen in the plot below, where 40,000 random walkers have been initialised at x=0 at time t=0, and they will walk for 1000 steps, i.e. for a time τ=1000Δt.