1. In Neverland, there are two political parties, Freedom Party (F) and Patriot
ID: 3039836 • Letter: 1
Question
1. In Neverland, there are two political parties, Freedom Party (F) and Patriot Party (P) During any given year, a Freedom Party member might switch to Patriot Party with probability 0.10, become an independent (I) with probability 0.15, or remain in Freedom Party with probability 0.75. A Patriot Party member might switch to Freedom Party with probability 0.05, become an independent with probability 0.10, or remain in Patriot Party with probability 0.85. An independent might join Freedom Party with probability 0.25, join Patriot Party with probability 0.10, or remain independent with probability 0.65.Explanation / Answer
This is a Markov chain problem. A player/entity has a finite number of states to choose from to be or to do. The basic concept is that there is a state of being at every stage/step. This is denoted by what that member has chosen to be or do in that particular stage/step. Going towards every next stage/step, there is a probability associated to what the player/entity will end up choosing to be or do - depending on his/her/its state in the previous stage. This is denoted by the transition probability matrix.
Please find Results and R-code below!
install.packages("markovchain")
library("markovchain")
# Number of states = 3 and these are f: freedom party, p = patriot party and i: independent
States = c("f","p","i")
byRow = TRUE
# Making transition matrix - as given in the question
pMatrix = matrix(data = c(0.75,0.1,0.15,0.05,0.85,0.1,0.25,0.1,0.65), byrow = byRow, nrow = length(States), dimnames = list(States, States))
mcp = new("markovchain", states = States, byrow = byRow,
transitionMatrix = pMatrix, name = "party")
--- Part (f)
Let number of years to become Patriot party member first time if Freedom party member now = Npf
Let number of years to become Patriot party member first time if Independent now = Npi
Npp = 0 (Time taken to become Patriot party member first time if Patriot party member now
We will calculate Expected number of days to go to P first time in the following manner:-
Equation 1 ==> Npf = 1 + (0.75)*Npf + (0.10)*Npp + (0.15)*Npi
Equation 2 ==> Npi = 1 + (0.25)*Npf + (0.10)*Npp + (0.65)*Npi
Solving, Npi = 2 + 0.8*Npi => Npi = 10 days
We want Npf; Npf = 10 days [ANSWER (f)]
------ Part (g)
--- R-CODE and RESULTS ---
initialState = c(0.4,0.48,0.12)
finalState = initialState*(mcp)
ANSWER (g - i)
## f p i
## 0.354 0.46 0.186
initialState = c(0.4,0.48,0.12)
finalState = initialState*(mcp)^2
ANSWER (g - ii)
## f p i
## 0.335 0.445 0.22
--- R-CODE and RESULTS ---
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.