马尔可夫链
马尔可夫依赖的概念,在第5节中针对伯努利试验进行了定义,可以推广到具有多个可能结果的试验。考虑一个具有个可能结果的实验的次试验,其中。对于和,令表示在第次试验中结果发生的事件。如果对于从1到的任何整数以及从1到的整数,事件满足条件
在讨论具有个可能结果的马尔可夫依赖试验时,通常采用一种直观易懂的语言。我们不说一个具有个可能结果的实验的次试验,而是说在个时刻观察一个具有个可能状态的系统的状态。我们将状态编号为(有时也编号为),并令表示系统在时刻处于状态的事件。如果(6.1)成立,我们就说该系统是一个具有个可能状态的马尔可夫链。用文字来说,(6.1)表明,在任何时刻,从当前状态转移到任何其他状态的条件概率,不依赖于如何到达当前状态。有时人们说,马尔可夫链是一个没有过去记忆的系统。
现在假设对于任何状态和,条件概率
由下式定义的步转移概率
类似地,可以证明
无条件概率,(6.6)在时刻马尔可夫链处于状态的概率,对于,可以通过初始无条件概率由下式给出
证明(6.7)的方法与证明(6.4)和(6.5)的方法完全相同。类似地,可以证明
具有个状态的马尔可夫链的转移概率最好以矩阵形式表示。
给定一个矩阵和一个矩阵,我们定义这两个矩阵的乘积为一个矩阵,其位于第行和第列交叉处的元素由下式给出
如果我们通过下式定义马尔可夫链的步转移概率矩阵
例6A。如果一个马尔可夫链的转移概率矩阵由下式给出那么该链由三个状态组成,因为是一个矩阵,并且2步和3步转移概率矩阵由下式给出
如果假设初始无条件概率由下式给出那么
如果存在数使得对于任何状态和,有
则我们定义一个具有个状态的马尔可夫链是遍历的。用文字来说,一个马尔可夫链是遍历的,如果当趋于时,步转移概率趋于一个极限,该极限仅依赖于最终状态,而不依赖于初始状态。如果一个马尔可夫链是遍历的,那么经过大量试验后,它会达到统计平衡,即无条件概率趋于极限
无论初始无条件概率的值是多少,这些极限都是相同的。要看出(6.13)蕴含(6.14),对(6.7)两边取极限,并利用这一事实。
鉴于(6.14),我们称为马尔可夫链的平稳概率,因为它们代表了在达到统计平衡后处于各个状态的概率。
马尔可夫链理论的重要问题之一是确定一个马尔可夫链在什么条件下是遍历的。对这个问题的讨论超出了本书的范围。我们不加证明地陈述以下定理。
如果存在一个整数使得
有时无需展示一个所有元素都为正的步转移概率矩阵,也可以确定一个马尔可夫链是遍历的。给定马尔可夫链中的两个状态和,如果存在状态使得
我们就说可以从到达。如果既可以从到达,又可以从到达,则称两个状态和是互通的。可以证明以下定理。
如果一个马尔可夫链中的所有状态都互通,并且存在一个状态使得,那么该马尔可夫链是遍历的。
在确定一个马尔可夫链是遍历的之后,下一个问题是求出平稳概率。从(6.4)可以清楚地看出,平稳概率满足线性方程组,
因此,如果一个马尔可夫链是遍历的,那么存在(6.17)的一个解,满足条件
例6B。例6A中考虑的马尔可夫链是遍历的,因为对于所有状态和,有。为了计算平稳概率,我们只需要求解方程
一个矩阵如果其任意一行元素之和等于1,则被定义为随机矩阵;用符号表示,如果
The matrix is defined as doubly stochastic if in addition the sum of the entries in any column is equal to 1; in symbols, is doubly stochastic if (6.20) holds and also
It is clear that the transition probability matrix of a Markov chain is stochastic. If is doubly stochastic (as is the matrix in example 6A), then the stationary probabilities are given by
Example 6C . Random walk with retaining barriers. Consider a straight line on which are marked off positions , and 5, arranged from left to right. A man (or an atomic particle, if one prefers physically significant examples) performs a random walk among the six positions by tossing a coin that has probability (where ) of falling heads and acting in accordance with the following set of rules: if the coin falls heads, move one position to the right, if at , or 4, and remain at 5, if at 5; if the coin falls tails, move one position to the left, if at , or 5, and remain at 0, if at 0. The positions 0 and 5 are retaining barriers; one cannot move past them. In example we consider the case in which positions 0 and 5 are absorbing barriers; if one reaches these positions, the walk stops. The transition probability matrix of the random walk with retaining barriers is given by
The chain is ergodic, since . To find the stationary probabilities , we solve the system of equations:
We solve these equations by successive substitution.
From the first equation we obtain By subtracting this result from the second equation in (6.24) , we obtain Similarly, we obtain
To determine , we use the fact that
We finally conclude that the stationary probabilities for the random walk with retaining barriers for are given by
If a Markov chain is ergodic, then the physical process represented by the Markov chain can continue indefinitely. Indeed, after a long time it achieves statistical equilibrium and probabilities exist of being in the various states that depend only on the transition probability matrix .
We next desire to study an important class of non-ergodic Markov chains, namely those that possess absorbing states. A state in a Markov chain is said to be absorbing if for all states , so that it is impossible to leave an absorbing state. Equivalently, a state is absorbing if .
Example 6D . Random walk with absorbing barriers. Consider a straight line on which positions , and 5, arranged from left to right, are marked off. Consider a man who performs a random walk among the six positions according to the following transition probability matrix:
In the Markov chain with transition probability matrix , given by (6.26) , the states 0 and 5 are absorbing states; consequently, this Markov chain is called a random walk with absorbing barriers. The model of a random walk with absorbing barriers describes the fortunes of gamblers with finite capital. Let two opponents, and , have 5 cents between them. Let toss a coin, which has probability of falling heads. On each toss he wins a penny if the coin falls heads and loses a penny if the coin falls tails. For we define the chain to be in state if has cents.
Given a Markov chain with an absorbing state , it is of interest to compute for each state
We call the probability of absorption in state , given the initial state , since one remains in if one ever arrives there.
The probability is defined on a sample description space consisting of a countably infinite number of trials. We do not in this book discuss the definition of probabilities on such sample spaces. Consequently, we cannot give a proof of the following basic theorem, which facilitates the computation of the absorption probabilities .
If is an absorbing state in a Markov chain with states , then the absorption probabilities are the unique solution to the system of equations:
Equation (6.28) is proved as follows. The probability of going from state to state is the sum, over all states , of the probability of going from to via ; this probability is the product of the probability of going from to in one step and the probability of then ever passing from to .
Example 6E . Probability of a gambler’s ruin. Let and play the coin-tossing game described in example 6D. If ’s initial fortune is 3 cents and
Solution
For let be the probability that ’s fortune will ever be 0, given that his initial fortune was cents. In view of (6.28), the absorption probabilities are the unique solution of the equations
To solve these equations we note that, defining ,
Exercises
6.1 . Compute the 2-step and 3-step transition probability matrices for the Markov chains whose transition probability matrices are given by
(i)
Answer
(i), (iii) ;
(ii)
(iv)
6.2 . For each Markov chain in exercise 6.1, determine whether or not (i) it is ergodic, (ii) it has absorbing states.
6.3 . Find the stationary probabilities for each of the following ergodic Markov chains:
(ii)
(iii)
Answer
(i), (iii) ; (ii) .
6.4 . Find the stationary probabilities for each of the following ergodic Markov chains:
6.5 . Consider a series of independent repeated tosses of a coin that has probability of falling heads. Let us say that at time we are in state , or depending on whether outcomes of tosses and were , or . Find the transition probability matrix of this Markov chain. Also find .
Answer
has rows . For the rows are .
6.6 . Random walk with retaining barriers. Consider a straight line on which positions are marked off. Consider a man who performs a random walk among the positions according to the following transition probability matrix: Prove that the Markov chain is ergodic. Find the stationary probabilities.
6.7 . Gambler’s ruin. Let two players and have 7 cents between them. Let toss a coin, which has probability of falling heads. On each toss he wins a penny if the coin falls heads and he loses a penny if the coin falls tails. If ’s initial fortune is 3 cents, what is the probability that ’s fortune will be 0 cents before it is 7 cents, and that will be ruined.
Answer
if if .
6.8 . Consider 2 urns, I and II, each of which contains 1 white and 1 red ball. One ball is drawn simultaneously from each urn and placed in the other urn. Let the probabilities that after repetitions of this procedure urn will contain 2 white balls, 1 white and 1 red, or 2 red balls be denoted by , and , respectively. Deduce formulas expressing , and in terms of , and . Show that , and tend to limiting values as tends to infinity. Interpret these values.
6.9 . In exercise 6.8 find the most probable number of red balls in urn after (i) 2, (ii) 6 exchanges.
Answer
.