Page 414 Excercise 3(Example 11.5)

Example 11.5 Each time a certain horse runs in a three-horse race, he has proba- bility 1/2 of winning, 1/4 of coming in second, and 1/4 of coming in third, indepen- dent 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 given as W P S
W(.5,.25,.25) P(.5,.25,.25) S(.5,.25,.25)

In Example 11.5, find P, P2, and P3. What is Pn?

transmatrix = matrix(c(.5,.5,.5,.25,.25,.25,.25,.25,.25),nrow=3,ncol=3)

p = function(n){
  output=matrix.power(transmatrix,n)
  print(output)
}

p(1)
##      [,1] [,2] [,3]
## [1,]  0.5 0.25 0.25
## [2,]  0.5 0.25 0.25
## [3,]  0.5 0.25 0.25
p(2)
##      [,1] [,2] [,3]
## [1,]  0.5 0.25 0.25
## [2,]  0.5 0.25 0.25
## [3,]  0.5 0.25 0.25
p(3)
##      [,1] [,2] [,3]
## [1,]  0.5 0.25 0.25
## [2,]  0.5 0.25 0.25
## [3,]  0.5 0.25 0.25
p(4)
##      [,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 say, Pn will also be the same.