Ehrenfest: Generate transition probability matrix of Ehrenfest model

Description Usage Arguments Details Author(s) Examples

Description

The Ehrenfest model is an interesting example of a Markov chain. Though the probabilities in decimals are not as interesting as expressed in fractions, the function will help the reader generate the transition probability matrices of 2n balls among two urns.

Usage

1

Arguments

n

2n will be the number of balls in the urns.

Details

In this experiment there are i balls in Urn I, and remaining 2n-i balls in Urn II. Then at any instance, the probability of selecting a ball from Urn I and placing it in Urn II is i/2n, and the other way of placing a ball from Urn II to Urn I is (2n-i)/2n. At each instant we let the number i of balls in the Urn I to be the state of the system. Thus, the state space is S = 0, 1, 2, ..., 2n . Then we can pass from state i only to either of the states i-1 or i+1. Here, S = 0, 1, ..., 2n.

Author(s)

Prabhanjan N. Tattar

Examples

1
2

Example output

     0   1    2   3    4
0 0.00 1.0 0.00 0.0 0.00
1 0.25 0.0 0.75 0.0 0.00
2 0.00 0.5 0.00 0.5 0.00
3 0.00 0.0 0.75 0.0 0.25
4 0.00 0.0 0.00 1.0 0.00
          0         1         2         3         4         5         6
0 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
1 0.1666667 0.0000000 0.8333333 0.0000000 0.0000000 0.0000000 0.0000000
2 0.0000000 0.3333333 0.0000000 0.6666667 0.0000000 0.0000000 0.0000000
3 0.0000000 0.0000000 0.5000000 0.0000000 0.5000000 0.0000000 0.0000000
4 0.0000000 0.0000000 0.0000000 0.6666667 0.0000000 0.3333333 0.0000000
5 0.0000000 0.0000000 0.0000000 0.0000000 0.8333333 0.0000000 0.1666667
6 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 1.0000000 0.0000000

ACSWR documentation built on May 2, 2019, 6:53 a.m.