]> Markov Chain Experiment

The Markov Chain Experiment

This applet requires the latest version of the Java plug-in. Please check your browser settings to make sure that Java applets are allowed. Visit the Java site to download and install the latest plug-in.

Description

This applet models a Markov chain with state space 0 1 n . The states are shown as balls in the top graph, with the current state colored red. At time 0, the initial state can be chosen be clicking on the desired state. As the process runs, the chain moves from state to state. The time and the sate are recorded at each update in the record table. The proportion of time that the chain is in each state is shown visually in the graph box and displayed numerically in the distribution table. In the limit, these proportions should converge to an appropriate limiting distribution.

The number of state can be varied with a scroll bar, and the transition probabilities can be specified in a dialog box that is launched by clicking on the transition probability button. Several special transition matrices can be selected from the dialog box:

The gambler's ruin chain is a simple random walk on S with absorbing barriers. Thus, the transition matrix is P given by

The random walk chain is a simple random walk on S with reflecting barriers. Thus, the transition matrix P is given by

The Ehrenfest chain models a simple diffusion process. Suppose that we have two urns containing a total of n balls. At each time unit, a ball is selected at random (so that each ball is equally likely to be chosen), and then moved to the opposite urn. The state at time t is the number of balls in urn 1. The transition matrix P is given by

P i i 1 i n ,  P i i 1 n i n ,  i S

The Bernoulli-Laplace chain models a simple diffusion process. Suppose that we have two urns, each with n balls. Of the 2 n balls, n are black and n are white. At each time unit, a ball is selected from each urn and the balls are interchanged. The state at time t is the number of black balls in urn 1. The transition matrix P is given by

P i i 1 i n 2 ,  P i i 1 n i n 2 ,  P i i 2 i n n i n ,  i S

This genetics chain models a gene that consists of n sub-units, each of which can be normal or mutant. The state of the gene is the number of mutant sub-units. The Markov chain governs the splitting of the gene, and has transition matrix P given by

P i j 2 i j 2 n 2 i n j 2 n n ,  i S ,  j S