]> The Ehrenfest Chains

## 6. The Ehrenfest Chains

#### Introduction

The Ehrenfest chains, named for Paul Ehrenfest, are simple, discrete models for the exchange of gas molecules between two containers. However, they can be formulated as simple ball and urn models; the balls correspond to the molecules and the urns to the two containers. Thus, suppose that we have two urns, labeled 0 and 1, that contain a total of $m$ balls. The state of the system at time $n$ is the number of balls in urn 1, which we will denote by $X n$. Our stochastic process is $X X 0 X 1 X 2$ with state space $S 0 1 m$. Of course, the number of balls in urn 0 at time $n$ is $m X n$.

#### The Basic Ehrenfest Chain

In the basic Ehrenfest model, at each discrete time unit, independently of the past, a ball is selected at random and moved to the other urn.

Show that $X$ is a Markov chain on $S$ with transition probability function $P$ given below. The steps show how to construct the chain from more basic processes.

$P x x 1 x m , P x x 1 m x m ; x S$
1. Let $V n$ be the ball selected at time $n$. Thus $V V 1 V 2 V 3$ is a sequence of independent random variables, each uniformly distributed on $1 2 m$.
2. Let $X 0 S$ be independent of $V$. We can start the process any way that we like.
3. Now we can define the state process recursively as follows: $X n 1 X n 1 V n 1 X n X n 1 V n 1 X n$.

Consider the basic Ehrenfest chain with $m 5$ balls, and suppose that $X 0$ has the uniform distribution on $S$.

1. Compute the probability density function, mean and variance of $X 1$.
2. Compute the probability density function, mean and variance of $X 2$.
3. Compute the probability density function, mean and variance of $X 3$.
4. Sketch the initial probability density function and the probability density functions in parts (a), (b), and (c) on a common set of axes.

In the Ehrenfest experiment, select the basic model. For selected values of $m$ and selected values of the initial state, run the chain for 1000 time steps and note the limiting behavior of the proportion of time spent in each state.

#### The Modified Ehrenfest Chain

Suppose now that we modify the basic Ehrenfest model as follows: at each discrete time, independently of the past, we select a ball at random and a urn at random. We then put the chosen ball in the chosen urn.

Show that $X$ is a Markov chain on $S$ with the transition probability matrix $Q$ given below. Sketch the state graph. The steps show how to construct the chain basic processes.

$Q x x 1 x 2 m , Q x x 12 , Q x x 1 m x 2 m ; x S$
1. Let $X 0$ and $V$ be as in Exercise 1.
2. Let $U n$ be the urn selected at time $n$. Thus $U U 1 U 2 U 3$ is a sequence of independent random variables, each uniformly distributed on $0 1$ (so that $U$ is a fair, Bernoulli trials sequence). Also, $U$ is independent of $V$ and $X 0$.
3. Now we can define the state process recursively as follows: $X n 1 X n 1 V n 1 X n U n 1 0 X n 1 V n 1 X n U n 1 1 X n$.

Consider the modified Ehrenfest chain with $m 5$ balls, and suppose that the chain starts in state 2 (with probability 1).

1. Compute the probability density function, mean and standard deviation of $X 1$.
2. Compute the probability density function, mean and standard deviation of $X 2$.
3. Compute the probability density function, mean and standard deviation of $X 3$.
4. Sketch the initial probability density function and the probability density functions in parts (a), (b), and (c) on a common set of axes.

In the Ehrenfest experiment, select the modified model. For selected values of $m$ and selected values of the initial state, run the chain for 1000 time steps and note the limiting behavior of the proportion of time spent in each state.

#### Classification

Show that the basic and modified Ehrenfest chains are irreducible and positive recurrent.

Show that basic Ehrenfest chain is periodic with period 2. Compute $P 2$ and identify the cyclic classes.

Show that the modified Ehrenfest chain is aperiodic.

#### Invariant and Limiting Distributions

Show that for the basic and modified Ehrenfest chains, the invariant distribution is the binomial distribution with trial parameter $m$ and success parameter $12$.

$f x m x 1 2 m , x S$

Thus, the invariant distribution corresponds to placing each ball randomly and independently either in urn 1 or in urn 2.

Find the mean return time to state $x S$ for the basic or modified Ehrenfest chain.

For the basic Ehrenfest chain, describe the limiting behavior of $P 2 n$ and $P 2 n 1$ as $n$.

For the modified Ehrenfest chain, describe the limiting behavior of $Q n$ as $n$.

In the Ehrenfest experiment, the limiting binomial distribution is shown graphically and numerically. For each model and for selected values of $m$ and selected values of the initial state, run the chain for 1000 time steps and note the limiting behavior of the proportion of time spent in each state. How do the choices of $m$, the initial state, and the model seem to affect the rate of convergence to the limiting distribution?

#### Reversibility

Show that the basic and modified Ehrenfest chains are reversible and use the reversibility condition to show again that the invariant distribution is the binomial distribution with trial parameter $m$ and success parameter $12$.

Run the simulation of the Ehrenfest experiment 10,000 time steps for each model, for selected values of $m$, and with initial state 0. Note that at first, you can see the arrow of time. After a long period, however, the direction of time is no longer evident.