Ehrenfest model (source code)

= Ehrenfest model
{c}
{wiki}

A model of random exchange between two containers, associated with <Paul Ehrenfest> and <Tatyana Afanasyeva-Ehrenfest>. In the discrete-time <Ehrenfest urn model>, choose one of $N$ balls uniformly at each step and change its container. The count in the first container decreases with probability $r/N$ and increases with probability $(N-r)/N$. A continuous-time version lets each particle change container independently at rate $\lambda$, giving <birth-death process> transition rates $r\lambda$ and $(N-r)\lambda$. Its sequence of visited states is the discrete urn <Markov chain>. Stopping when one container becomes empty produces an absorbing variant, rather than changing the transition rule of the unstopped model.