4 Markov chains

4.7 Ehrenfest model of diffusion and its invariant distribution

(From Grimmett and Stirzaker) Two containers A and B are placed adjacent to each other and gas is allowed to pass through a small aperture joining them. A total of m gas molecules is distributed between the containers. We assume that at each time-step one molecule, picked uniformly at random from the m available, passes through this aperture.

Let Xn be the number of molecules in container A after n units of time have passed. Clearly {Xn} is a Markov chain with transition matrix

Pi,i-1=im,  1imPi,i+1=1-im,  0im-1.

i.e.

(010000001/m01-1/m0000002/m01-2/m0000000001-1/m01/m00000010)

(Check that the formula makes sense for the end points!) Another interpretation for this model is as follows. Consider an urn containing m balls each of which is either of colour A or colour B. A ball is drawn from the urn at random and is replaced by a ball of the other colour. Let Xn denote the number of balls of colour A after the n-th draw.

We could find the stationary distribution by solving πP=π; this involves solving a rather unfriendly second order difference equation. Alternatively it seems sensible that when at equilibrium someone observing a video of the system would be unable to tell whether or not it was being shown backwards, and so the system should satisfy detailed balance equations; Theorem 4.4.10 confirms this.

πiPi,i+1=πi+1Pi+1,i,i.e.πi(1-im)=πi+1i+1m,  0im-1,

or equivalently

πi+1=m-ii+1πi,  0im-1.

Thus

π1 = m1π0
π2 = m-12π1=m(m-1)2×1π0
π3 = m-23π2=m(m-1)(m-2)3×2×1π0.

In general

πi=m!i!(m-i)!π0.

So

1=i=0mπi=π0i=0mm!i!(m-i)!=π0(1+1)m.

Therefore π0=1/2m and

πi=12m(mi),   0im,

which is the binomial probability with parameters m and 1/2.

This is the chance if the objects were allocated at random we would end up with i in A and m-i in B.

In a large system at equilibrium it is very likely that Xm/2 since this is the mean of the binomial distribution.

The next topic is of interest on its own and is related to the existence of the stationary distribution.