Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Ehrenfest

Generate transition probability matrix of Ehrenfest model


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

Ehrenfest(n)

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

Ehrenfest(2)
Ehrenfest(3)

ACSWR

A Companion Package for the Book "A Course in Statistics with R"

v1.0
GPL-2
Authors
Prabhanjan Tattar
Initial release
2015-09-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.