Every problem in the chapter beside the book’s answer, a chapter at a time as you scroll.

Chapter 11: Markov Chains

14 problems · 0 figures

Exercise 11.3.1 §11.3 source ↗

Which of the following matrices are transition matrices for regular Markov chains?

(a) 𝐏=(.5.5.5.5)⁠.

(b) 𝐏=(.5.510)⁠.

(c) 𝐏=(1/302/301001/54/5)⁠.

(d) 𝐏=(0110)⁠.

(e) 𝐏= (1/21/2001/21/21/31/31/3)⁠.

Answer

(a), (f)

Exercise 11.3.3 §11.3 source ↗

Consider the Markov chain with general 2×2 transition matrix 𝐏=(1−aab1−b) .

(a) Under what conditions is 𝐏 absorbing?

(b) Under what conditions is 𝐏 ergodic but not regular?

(c) Under what conditions is 𝐏 regular?

Answer

(a) a=0 or b=0

(b) a=b=1

(c) (0< a< 1 and 0< b< 1) or (a=1 and 0<b<1) or (0<a<1 and b=1)⁠.

Exercise 11.3.5 §11.3 source ↗

Find the fixed probability vector 𝐰 for each of the following regular matrices.

(a) 𝐏=(.75.25.5.5)⁠.

(b) 𝐏=(.9.1.1.9)⁠.

(c) 𝐏= (3/41/4002/31/31/41/41/2)⁠.

Answer

(a) (2/3,1/3)

(b) (1/2,1/2)

(c) (2/7,3/7,2/7)

Exercise 11.3.7 §11.3 source ↗

Consider the Markov chain with transition matrix of Exercise 3, with a=0 and b=1/2⁠. Compute directly the unique fixed probability vector, and use your result to prove that the chain is not ergodic.

Exercise 11.3.3 in the book ↗

Consider the Markov chain with general 2×2 transition matrix 𝐏=(1−aab1−b) .

(a) Under what conditions is 𝐏 absorbing?

(b) Under what conditions is 𝐏 ergodic but not regular?

(c) Under what conditions is 𝐏 regular?

Answer

The fixed vector is (1,0) and the entries of this vector are not strictly positive, as required for the fixed vector of an ergodic chain.

Exercise 11.3.9 §11.3 source ↗

Prove that, if a 3-by-3 transition matrix has the property that its column sums are 1, then (1/3,1/3,1/3) is a fixed probability vector. State a similar result for n⁠-by-⁠n transition matrices. Interpret these results for ergodic chains.

Answer

Let 𝐏=(p11p12p13p21p22p23p31p32p33) , with column sums equal to 1. Then (1/3,1/3,1/3)𝐏=(1/3∑j=13pj1,1/3∑j=13pj2,1/3∑j=13pj3)=(1/3,1/3,1/3) . The same argument shows that if 𝐏 is an n×n transition matrix with columns that add to 1 then 𝐰=(1/n,⋯,1/n) is a fixed probability vector. For an ergodic chain this means the the average number of times in each state is 1/n⁠.

Exercise 11.3.11 §11.3 source ↗

Is the Markov chain in Example 11.11 ergodic?

Example 11.11 in the book ↗

We start with two animals of opposite sex, mate them, select two of their offspring of opposite sex, and mate those, and so forth. To simplify the example, we will assume that the trait under consideration is independent of sex.

Here a state is determined by a pair of animals. Hence, the states of our process will be: s1=(GG,GG)⁠, s2=(GG,Gg)⁠, s3=(GG,gg)⁠, s4=(Gg,Gg)⁠, s5=(Gg,gg)⁠, and s6=(gg,gg)⁠.

We illustrate the calculation of transition probabilities in terms of the state s2⁠. When the process is in this state, one parent has GG genes, the other Gg. Hence, the probability of a dominant offspring is 1/2. Then the probability of transition to s1 (selection of two dominants) is 1/4, transition to s2 is 1/2, and to s4 is 1/4. The other states are treated the same way. The transition matrix of this chain is:

𝐏1=GG,GG1.000.000.000.000.000.000GG,Gg.250.500.000.250.000.000GG,gg.000.000.0001.000.000.000Gg,Gg.062.250.125.250.250.062Gg,gg.000.000.000.250.500.250gg,gg.000.000.000.000.0001.000(GG,GGGG,GgGG,ggGg,GgGg,gggg,gg1.000.000.000.000.000.000.250.500.000.250.000.000.000.000.0001.000.000.000.062.250.125.250.250.062.000.000.000.250.500.250.000.000.000.000.0001.000)GG,GGGG,GgGG,ggGg,GgGg,gggg,gg1.000.000.000.000.000.000.250.500.000.250.000.000.000.000.0001.000.000.000.062.250.125.250.250.062.000.000.000.250.500.250.000.000.000.000.0001.000 .

Answer

In Example 11.11 of Section 11.1, the state (GG,GG) is absorbing, and the same reasoning as in the immediately preceding answer applies to show that this chain is not ergodic.

Exercise 11.3.13 §11.3 source ↗

For Example 11.4 when 𝐏 is ergodic, what is the proportion of people who are told that the President will run? Interpret the fact that this proportion is independent of the starting state.

Example 11.4 in the book ↗

The President of the United States tells person A his or her intention to run or not to run in the next election. Then A relays the news to B, who in turn relays the message to C, and so forth, always to some new person. We assume that there is a probability a that a person will change the answer from yes to no when transmitting it to the next person and a probability b that he or she will change it from no to yes. We choose as states the message, either yes or no. The transition matrix is then 𝐏=yes1−aanob1−b(yesno1−aab1−b)yesno1−aab1−b . The initial state represents the President’s choice.

Answer

The fixed vector is 𝐰=(a/(b+a),b/(b+a))⁠. Thus in the long run a proportion b/(b+a) of the people will be told that the President will run. The fact that this is independent of the starting state means it is independent of the decision that the President actually makes. (See Exercise 2 of Section 11.1)

Exercise 11.3.15 §11.3 source ↗

Show that Example 11.8 is an ergodic chain, but not a regular chain. Show that its fixed probability vector 𝐰 is a binomial distribution.

Example 11.8 in the book ↗

(Ehrenfest Model) The following is a special case of a model, called the Ehrenfest model, (P. and T. Ehrenfest, “Über zwei bekannte Einwände gegen das Boltzmannsche H-Theorem," Physikalishce Zeitschrift, vol. 8 (1907), pp. 311-314.) that has been used to explain diffusion of gases. The general model will be discussed in detail in Section 11.5. We have two urns that, between them, contain four balls. At each step, one of the four balls is chosen at random and moved from the urn that it is in into the other urn. We choose, as states, the number of balls in the first urn. The transition matrix is then 𝐏=00100011/403/400201/201/203003/401/4400010(01234010001/403/40001/201/20003/401/400010)01234010001/403/40001/201/20003/401/400010 .

Answer

It is clearly possible to go between any two states, so the chain is ergodic. From 0 it is possible to go to states 0, 2, and 4 only in an even number of steps, so the chain is not regular. For the general Erhrenfest Urn model the fixed vector must statisfy the following equations: 1nw1=w0 , wj+1j+1n+wj−1n−j+1n=wj ,if 0<j<n, 1nwn−1=wn . It is easy to check that the binomial coefficients satisfy these conditions.

Exercise 11.3.17 §11.3 source ↗

Toss a fair die repeatedly. Let Sn denote the total of the outcomes through the n⁠th toss. Show that there is a limiting value for the proportion of the first n values of Sn that are divisible by 7, and compute the value for this limit. Hint: The desired limit is an equilibrium probability vector for an appropriate seven state Markov chain.

Answer

Consider the Markov chain whose state is the value of Snmod(7)⁠, that is, the remainder when Sn is divided by 7. Then the transition matrix for this chain is 𝐏=001/61/61/61/61/61/611/601/61/61/61/61/621/61/601/61/61/61/631/61/61/601/61/61/641/61/61/61/601/61/651/61/61/61/61/601/661/61/61/61/61/61/60(012345601/61/61/61/61/61/61/601/61/61/61/61/61/61/601/61/61/61/61/61/61/601/61/61/61/61/61/61/601/61/61/61/61/61/61/601/61/61/61/61/61/61/60)012345601/61/61/61/61/61/61/601/61/61/61/61/61/61/601/61/61/61/61/61/61/601/61/61/61/61/61/61/601/61/61/61/61/61/61/601/61/61/61/61/61/61/60 . Since the column sums of this matrix are 1, the fixed vector is 𝐰=(1/7,1/7,1/7,1/7,1/7,1/7,1/7) .

Exercise *11.3.19 §11.3 source ↗

Define f(r) to be the smallest integer n such that for all regular Markov chains with r states, the n⁠th power of the transition matrix has all entries positive. It has been shown, (E. Seneta, Non-Negative Matrices: An Introduction to Theory and Applications, Wiley, New York, 1973, pp. 52-54.) that f(r)=r2−2r+2⁠.

(a) Define the transition matrix of an r⁠-state Markov chain as follows: For states si⁠, with i=1⁠, 2, …, r−2⁠, 𝐏(i,i+1)=1⁠, 𝐏(r−1,r)=𝐏(r−1,1)=1/2⁠, and 𝐏(r,1)=1⁠. Show that this is a regular Markov chain.

(b) For r=3⁠, verify that the fifth power is the first power that has no zeros.

(c) Show that, for general r⁠, the smallest n such that 𝐏n has all entries positive is n=f(r)⁠.

Answer

(a) For the general chain it is possible to go from any state i to any other state j in r2−2r+2 steps. We show how this can be done starting in state 1. To return to 1, circle (1,2,..,r−1,1) r−2 times (r2−3r+2 steps) and (1,...,r,1) once (r steps). For k=1,...,r−1 to reach state k+1⁠, circle (1,2,…,r,1) r−k times (r2−rk steps) then (1,2,…,r−1,1) k−2 times (rk−2r−k+2 steps) and then move to k+1 in k steps.You have taken r2−2r+2 steps in all. The argument is the same for any other starting state with everything translated the appropriate amount.

(b) 𝐏=(0∗0∗0∗∗00) ,𝐏2=(∗0∗∗∗00∗0) ,𝐏3=(∗∗0∗∗∗∗0∗) , 𝐏4=(∗∗∗∗∗∗∗∗0) ,𝐏5=(∗∗∗∗∗∗∗∗∗) .

Exercise 11.3.25 §11.3 source ↗

Prove that, in an r⁠-state ergodic chain, it is possible to go from any state to any other state in at most r−1 steps.

Answer

To each Markov chain we can associate a directed graph, whose vertices are the states i of the chain, and whose edges are determined by the transition matrix: the graph has an edge from i to j if and only if pij>0⁠. Then to say that 𝐏 is ergodic means that from any state i you can find a path following the arrows until you reach any state j⁠. If you cut out all the loops in this path you will then have a path that never interesects itself, but still leads from i to j⁠. This path will have at most r−1 edges, since each edge leads to a different state and none leads to i⁠. Following this path requires at most r−1 steps.

Exercise 11.3.27 §11.3 source ↗

Prove that if 𝐏 is the transition matrix of an ergodic chain, then (1/2)(𝐈+𝐏) is the transition matrix of a regular chain. Hint: Use Exercise 26.

Exercise 11.3.26 in the book ↗

Let 𝐏 be the transition matrix of an r⁠-state ergodic chain. Prove that, if the diagonal entries pii are positive, then the chain is regular.

Answer

If 𝐏 is ergodic it is possible to go between any two states. The same will be true for the chain with transition matrix 12(𝐈+𝐏)⁠. But for this chain it is possible to remain in any state; therefore, by Exercise 26, this chain is regular.

Exercise 11.3.29 §11.3 source ↗

Table 11.4 in the book ↗

(424)(523)(824)(734)(844)(835)(848)(1046)(1248)(1257)(1268)(1358)(1668)(1569)(16612)(17710)(20812)(20812) . Distribution of chips.

In his book, Wahrscheinlichkeitsrechnung und Statistik, (A. Engle, Wahrscheinlichkeitsrechnung und Statistik, vol. 2 (Stuttgart: Klett Verlag, 1976).) A. Engle proposes an algorithm for finding the fixed vector for an ergodic Markov chain when the transition probabilities are rational numbers. Here is his algorithm: For each state i⁠, let ai be the least common multiple of the denominators of the non-zero entries in the i⁠th row. Engle describes his algorithm in terms of moving chips around on the states—indeed, for small examples, he recommends implementing the algorithm this way. Start by putting ai chips on state i for all i⁠. Then, at each state, redistribute the ai chips, sending aipij to state j⁠. The number of chips at state i after this redistribution need not be a multiple of ai⁠. For each state i⁠, add just enough chips to bring the number of chips at state i up to a multiple of ai⁠. Then redistribute the chips in the same manner. This process will eventually reach a point where the number of chips at each state, after the redistribution, is the same as before redistribution. At this point, we have found a fixed vector. Here is an example: 𝐏=11/21/41/421/201/231/21/41/4(1231/21/41/41/201/21/21/41/4)1231/21/41/41/201/21/21/41/4 . We start with 𝐚=(4,2,4)⁠. The chips after successive redistributions are shown in Table 11.4.

(424)(523)(824)(734)(844)(835)(848)(1046)(1248)(1257)(1268)(1358)(1668)(1569)(16612)(17710)(20812)(20812) . Distribution of chips.

We find that 𝐚=(20,8,12) is a fixed vector.

(a) Write a computer program to implement this algorithm.

(b) Prove that the algorithm will stop. Hint: Let 𝐛 be a vector with integer components that is a fixed vector for 𝐏 and such that each coordinate of the starting vector 𝐚 is less than or equal to the corresponding component of 𝐛⁠. Show that, in the iteration, the components of the vectors are always increasing, and always less than or equal to the corresponding component of 𝐛⁠.

Answer

(b) Since 𝐏 has rational transition probabilities, when you solve for the fixed vector you will get a vector 𝐚 with rational components. We can multiply through by a sufficiently large integer to obtain a fixed vector 𝐮 with integer components such that each component of 𝐮 is an integer multiple of the corresponding component of 𝐚⁠. Let 𝐚(n) be the vector resulting from the n⁠th iteration. Let 𝐛(n)=𝐚(n)𝐏⁠. Then 𝐚(n+1) is obtained by adding chips to 𝐛(n+1)⁠. We want to prove that 𝐚(n+1)≥𝐚(n)⁠. This is true for n=0 by construction. Assume that it is true for n⁠. Then multiplying the inequality by 𝐏 gives that 𝐛(n+1)≥𝐛(n)⁠. Consider the component aj(n+1)⁠. This is obtained by adding chips to bj(n+1) until we get a multiple of aj⁠. Since bj(n)≤bj(n+1)⁠, any multiple of aj that could be obtained in this manner to define aj(n+1) could also have been obtained to define aj(n) by adding more chips if necessary. Since we take the smallest possible multiple aj⁠, we must have aj(n)≤ajn+1⁠. Thus the results after each iteration are monotone increasing. On the other hand, they are always less than or equal to 𝐮⁠. Since there are only a finite number of integers between components of 𝐚 and 𝐮⁠, the iteration will have to stop after a finite number of steps.

Exercise *11.3.31 §11.3 source ↗

(Alternate proof of Theorem 11.8) Let 𝐏 be the transition matrix of an ergodic Markov chain. Let 𝐱 be any column vector such that 𝐏𝐱=𝐱⁠. Let M be the maximum value of the components of 𝐱⁠. Assume that xi=M⁠. Show that if pij>0 then xj=M⁠. Use this to prove that 𝐱 must be a constant vector.

Theorem 11.8 in the book ↗

Let 𝐏 be a regular transition matrix, let 𝐖=limn→∞⁡𝐏n , let 𝐰 be the common row of 𝐖⁠, and let 𝐜 be the column vector all of whose components are 1. Then

(a) 𝐰𝐏=𝐰⁠, and any row vector 𝐯 such that 𝐯𝐏=𝐯 is a constant multiple of 𝐰⁠.

(b) 𝐏𝐜=𝐜⁠, and any column vector x such that 𝐏𝐱=𝐱 is a multiple of 𝐜⁠.

Proof. To prove part (a), we note that from Theorem 11.7, 𝐏n→𝐖 . Thus, 𝐏n+1=𝐏n⋅𝐏→𝐖𝐏 . But 𝐏n+1→𝐖⁠, and so 𝐖=𝐖𝐏⁠, and 𝐰=𝐰𝐏⁠.

Let 𝐯 be any vector with 𝐯𝐏=𝐯⁠. Then 𝐯=𝐯𝐏n⁠, and passing to the limit, 𝐯=𝐯𝐖⁠. Let r be the sum of the components of 𝐯⁠. Then it is easily checked that 𝐯𝐖=r𝐰⁠. So, 𝐯=r𝐰⁠.

To prove part (b), assume that 𝐱=𝐏𝐱⁠. Then 𝐱=𝐏n𝐱⁠, and again passing to the limit, 𝐱=𝐖𝐱⁠. Since all rows of 𝐖 are the same, the components of 𝐖𝐱 are all equal, so 𝐱 is a multiple of 𝐜⁠.

Theorem 11.7 in the book ↗

Let 𝐏 be the transition matrix for a regular chain. Then, as n→∞⁠, the powers 𝐏n approach a limiting matrix 𝐖 with all rows the same vector 𝐰⁠. The vector 𝐰 is a strictly positive probability vector (i.e., the components are all positive and they sum to one).

Answer

If the maximum of a set of numbers is an average of other elements of the set, then each of the elements with positive weight in this average must also be maximum. By assumption, 𝐏𝐱=𝐱⁠. This implies 𝐏n𝐱=𝐱 for all n⁠. Assume that xi=M⁠, where M is the maximum value for the xk⁠’s, and let j be any other state. Then there is an n such that pijn>0⁠. The i⁠th row of the equation 𝐏n𝐱=𝐱 presents xi as an average of values of xk with positive weight,one of which is xj⁠. Thus xj=M⁠, and 𝐱 is constant.

End of the book.

Exercises and answers are adapted from Grinstead and Snell's Introduction to Probability by The CHANCE Project, which is free to read and download, and are used under the GNU FDL licence. They are taken from the GNU version’s LaTeX source (4 July 2006), with answers from the authors’ published answers to the odd-numbered exercises, and set for the web, so they may differ slightly from the printed page. This adaptation is released under the same licence and is neither affiliated with nor endorsed by Grinstead and Snell or American Mathematical Society. Copyright (C) 2006 Peter G. Doyle. This work is a version of Grinstead and Snell's ‘Introduction to Probability, 2nd edition’, published by the American Mathematical Society, Copyright (C) 2003 Charles M. Grinstead and J. Laurie Snell.