Example 11.5 Each time a certain horse runs in a three-horse race, he has probability 1/2 of winning, 1/4 of coming in second, and 1/4 of coming in third, independent of the outcome of any previous race. We have an independent trials process, but it can also be considered from the point of view of Markov chain theory. The transition matrix is
W P S
W .5 .25 .25
P= P .5 .25 .25
S .5 .25 .25
Pg 414 3. In Example 11.5, find P, P2, and P3. What is Pn?
P = matrix(c(.5, .25, .25,
.5, .25, .25,
.5, .25, .25), nrow = 3, ncol = 3, byrow=T)
P2 = P %*% P
print(P2)
## [,1] [,2] [,3]
## [1,] 0.5 0.25 0.25
## [2,] 0.5 0.25 0.25
## [3,] 0.5 0.25 0.25
P3 = P2 %*% P
print(P3)
## [,1] [,2] [,3]
## [1,] 0.5 0.25 0.25
## [2,] 0.5 0.25 0.25
## [3,] 0.5 0.25 0.25
# To visualize PN for very large N:
P100 = P
for (i in 1:99)
P100 = P100 %*% P
print(P100)
## [,1] [,2] [,3]
## [1,] 0.5 0.25 0.25
## [2,] 0.5 0.25 0.25
## [3,] 0.5 0.25 0.25
From the above we can see that Pn is the same as P.