p <- matrix(c(0.8, 0.1, 0.1,
0.2, 0.6, 0.2,
0.25, 0.25, 0.5), nrow = 3, byrow = TRUE)
rownames(p) <- c("Professional", "Skilled", "Unskilled")
colnames(p) <- c("Professional", "Skilled", "Unskilled")
p
## Professional Skilled Unskilled
## Professional 0.80 0.10 0.1
## Skilled 0.20 0.60 0.2
## Unskilled 0.25 0.25 0.5
p.squared <- p %*% p
p.squared
## Professional Skilled Unskilled
## Professional 0.685 0.165 0.150
## Skilled 0.330 0.430 0.240
## Unskilled 0.375 0.300 0.325
Given that the matrix is applicable only for children, we need to calculated \(P^2\) for a grandchild. So the probability that a randomly chosen grandson of an unskilled laborer will turn out to be a professional man is only 0.375.