WOLFRAM|DEMONSTRATIONS PROJECT

Simulating the Bernoulli-Laplace Model of Diffusion

​
balls
30
steps
500
seed
1
This Demonstration simulates a special discrete-time Markov chain, the so-called Bernoulli–Laplace model of diffusion. In this model, there are two urns; initially, urn I contains exactly
N
black balls and urn II contains exactly
N
white balls. Repeat the following experiment: one ball is selected at random from each of the urns. The ball selected from urn I is put into urn II and the ball selected from urn II is put into urn I. During such a sequence of experiments, we consider the number of white balls in urn I. The resulting random process is a discrete-time Markov chain.
The lower part of the Demonstration shows a simulated path of the process together with a confidence interval that has at least the probability 0.95. The upper part shows both the stationary distribution of the state of the process (the red broken line) and the empirical distribution calculated from the path shown (the blue broken line; the first 200 steps are rejected as transient).