A die is rolled repeatedly. Show by the results of this section that the mean time between occurrences of a given number is 6.

> P <- matrix(data = 0, nrow = 6, ncol = 6)
> P[, 1:6] <- rep(1/6, 6)
> coefs <- t(P) - diag(6)
> solve(rbind(c(1, 1, 1, 1, 1, 1), coefs)[1:6, ], c(1, 0, 0, 0,
+     0, 0))
[1] 0.1666667 0.1666667 0.1666667 0.1666667 0.1666667 0.1666667

Long range probabilities throw no surprise 1/6 in all the cases