CHAPTER 11. MARKOV CHAINS

  1. introduction

page 414

  1. Assume that a man’s profession can be classified as professional, skilled laborer, or unskilled laborer. Assume that, of the sons of professional men, 80 percent are professional, 10 percent are skilled laborers, and 10 percent are unskilled laborers. In the case of sons of skilled laborers, 60 percent are skilled laborers, 20 percent are professional, and 20 percent are unskilled. Finally, in the case of unskilled laborers, 50 percent of the sons are unskilled laborers, and 25 percent each are in the other two categories. Assume that every man has at least one son, and form a Markov chain by following the profession of a randomly chosen son of a given family through several generations. Set up the matrix of transition probabilities. Find the probability that a randomly chosen grandson of an unskilled laborer is a professional man.

Solution

# Trasition matrix:
p <- data.frame("unskilled"=c(0.25,0.5,0.25),"Porfessional"=c(0.8,0.1,0.1),"skilled"=c(0.2,0.6,0.2))
row.names(p) <- c("unskilled","Porfessional","skilled")
p
##              unskilled Porfessional skilled
## unskilled         0.25          0.8     0.2
## Porfessional      0.50          0.1     0.6
## skilled           0.25          0.1     0.2
p<- as.matrix(p)

#initial vector:
pi_0 <- matrix(c(1,0,0),1,3)

grandson <- pi_0 %*% p %*% p %*% p

cat("The probability that a randomly chosen grandson of an unskilled laborer is a professional man is", grandson[2])
## The probability that a randomly chosen grandson of an unskilled laborer is a professional man is 0.497