Mini-Monopoly definition

Mini-Monopoly is defined as follows.

Initial exploration

Creating a transition matrix

At first, simply create a transition matrix rollTrans for a Markov chain with eight states and moves determined by rolls of a fair 4-sided die. Rather than typing out all of the numbers in the matrix, write a function that will do it for you, and which we can generalize later. Your function should accept two arguments: a number of states and a number of sides on the die. The function should return the transition matrix.

Investigating the steady-state distribution

Investigate the steady-state distribution of your transition matrix rollTrans. Do this in three different ways:

  1. Simulate a large number of ‘agents’ that start in any state(s) and move around probabilistically for a long time.
  2. Raise your matrix to a high power (using matrix multiplication) and look at the entries in any column.
  3. Find the eigenvector corresponding to eigenvalue 1.

Add the Jail

Use matrix multiplication to create a new transition matrix

Instead of modifying rollTrans to account for the Go to Jail move, we can use matrix multiplication. The idea is simple. As the game describes, first we move by rolling a die, and if we land on state 7, then we move to jail. The move from the die roll is given by rollTrans, and the Go to Jail move will be given by a new matrix jailTrans.

The matrix jailTrans is not much different from the 8x8 identity matrix. Most of the time there is no transition (\(i->i\) with probability 1). Only if we land on the special go to jail site (site 7) do we transition to jail (site 3). This means \(7->3\) with probability 1. Thus, build jailTrans by first creating an identity matrix, and then modify column 7.

After you have created the jailTrans matrix, multiply jailTrans %*% rollTrans to obtain the new transition matrix. Note that jailTrans is multiplied on the left.

Steady state for the Roll+Jail transition matrix

Investigate the steady-state distribution using your favorite method.

Add Chance

Create a new transition matix

Use the same idea as last time: Create a transition matrix, chanceTrans, to represent the effect of selecting a Chance card and moving accordingly.

Recall that Chance is state 6. If you land on this state, you draw one of 16 cards. One card results in Go to Jail, one results in Go to Go, one results in Go to 4, and the remaining 13 result in no further move on this turn.

The matrix chanceTrans should represent only these moves that result from Chance cards. After you have created this matrix, the final transition matrix will be the product chanceTrans %*% jailTrans %*% rollTrans.

Steady state for the Roll+Jail+Chance transition matrix

Investigate the steady-state distribution using your favorite method.

Comparing all three steady-state distributions

Use ggplot2 to make a bar chart that compares the three steady-state distributions.

You will need to create a data frame to store the three steady-state distributions. Suppose that you have these distributions in the vectors rollDist, rollJailDist, and rollJailChanceDist. Then you can create the data frame like this:

monopolyData <- data.frame(prob=c(rollDist, rollJailDist, rollJailChanceDist),
                      site=rep(1:numStates, 3),
                      type=rep(c("Roll", "Roll+Jail", "Roll+Jail+Chance"), each=8))

After creating the data frame, you can make a bar chart like this:

ggplot(monopolyData) +
    geom_bar(aes(site, prob, fill=type), stat="identity", position="dodge", width=0.75) +
    scale_x_continuous(breaks=1:8) +
    ggtitle("Steady-state distribution for Mini-monopoly")

We can see the effect of the additional rules:

Assignment for Friday:

Re-do the analysis of mini-Monopoly making the following adjustments. You only need to compute the steady-state values one way (powers or agents or eigenstuff)