Chapter 11 Markov Chains - 11.1 Exercise 4

Find the probability that the grandson of a man from Harvard went to Harvard.

Example

In the Dark Ages, Harvard, Dartmouth, and Yale admitted only male students. Assume that, at that time, 80 percent of the sons of Harvard men went to Harvard and the rest went to Yale, 40 percent of the sons of Yale men went to Yale, and the rest split evenly between Harvard and Dartmouth; and of the sons of Dartmouth men, 70 percent went to Dartmouth, 20 percent to Harvard, and 10 percent to Yale. We form a Markov chain with transition matrix.

Solution

Based on an interesting article on DATACONOMY I was able to obtain some pertinent information regarding the usage of the markovchain package in R. The article can be found here: https://dataconomy.com/2018/03/an-introduction-to-markov-chains-using-r/

Following the example of Uber drivers I took the knowledge acquired from the article and plugged in the numbers from the example.

library(markovchain)
## Package:  markovchain
## Version:  0.6.9.12
## Date:     2018-08-23
## BugReport: http://github.com/spedygiorgio/markovchain/issues
DarkAges <- c("Harvard","Yale","Dartmouth")
IvyTransition <- matrix(c(0.8,0.2,0,
                          0.3,0.4,0.3,
                          0.2,0.1,0.7),
                         nrow=3,
                         byrow = T,
                         dimnames = list(DarkAges,DarkAges))
IvyTransition
##           Harvard Yale Dartmouth
## Harvard       0.8  0.2       0.0
## Yale          0.3  0.4       0.3
## Dartmouth     0.2  0.1       0.7
Ivy <-new("markovchain",states=DarkAges,byrow=T,transitionMatrix=IvyTransition,name="Male Students")
Ivy
## Male Students 
##  A  3 - dimensional discrete Markov Chain defined by the following states: 
##  Harvard, Yale, Dartmouth 
##  The transition matrix  (by rows)  is defined as follows: 
##           Harvard Yale Dartmouth
## Harvard       0.8  0.2       0.0
## Yale          0.3  0.4       0.3
## Dartmouth     0.2  0.1       0.7
Ivy^2
## Male Students^2 
##  A  3 - dimensional discrete Markov Chain defined by the following states: 
##  Harvard, Yale, Dartmouth 
##  The transition matrix  (by rows)  is defined as follows: 
##           Harvard Yale Dartmouth
## Harvard      0.70 0.24      0.06
## Yale         0.42 0.25      0.33
## Dartmouth    0.33 0.15      0.52

Outcome

In the article it states that the transition matrix is the only calculation that needs to be raised to a power. Therefore, the probability that the grandson will indeed choose Harvard is 0.7

To go a step further, we will look to see the probability that the great-grandson will attend Harvard by raising the transition matrix to the power of 3.

Ivy^3
## Male Students^3 
##  A  3 - dimensional discrete Markov Chain defined by the following states: 
##  Harvard, Yale, Dartmouth 
##  The transition matrix  (by rows)  is defined as follows: 
##           Harvard  Yale Dartmouth
## Harvard     0.644 0.242     0.114
## Yale        0.477 0.217     0.306
## Dartmouth   0.413 0.178     0.409

Now, we can see that the probability is now 0.644