A group of 120 students studying mathematics and commerce are surveyed once a mo
ID: 3355436 • Letter: A
Question
A group of 120 students studying mathematics and commerce are surveyed once a month about their preferred subject. Initially 50 of the students surveyed prefer commerce and the others prefer maths. A Markov process is used to model changes in student preferences, with the initial state vector and stochastic matrix given below 50 6 (a) Find the missing numbers in vo and S. (b) Calculate the state vector v2 (This represents the students preferences after two month) (c) Calculate the long-term state vector vo and deduce how many of the surveyed students will prefer maths in the long term (according to the Markov process usedExplanation / Answer
--- PART (a)
V0 is the distribution of 120 students across Maths and Commerce. As Comerce has 50 students, Maths has 70 students [ANSWER 1]
In S, the row probabilities should add up to 1
--- PART (b)
For v2, use the below R-code to get the results
install.packages("markovchain")
library("markovchain")
# Number of states = 2 and these are c: commerce, m = mathematics
States = c("c","m")
byRow = TRUE
# Making transition matrix - as given in the question
sMatrix = matrix(data = c(5/6,1/6,1/3,2/3), byrow = byRow, nrow = length(States), dimnames = list(States, States))
mcs = new("markovchain", states = States, byrow = byRow,
transitionMatrix = sMatrix, name = "subjects")
## Part b:
# The final state matrix is found by multiplying the initial state matrix to the
# transition probability matrix raised to power equal to number of stages
initialState = c(50,70) # Freedom party member initially
finalState = initialState*(mcs)^2
## c m
## 72.5 47.5 <-- ANSWER (b)
--- PART (c)
Long-term state is the steady state situation. Find it using the following R-code
## Part c:
# Steady state condition: how many Maths students?
steadyStates(mcs)
finalDistribution = 120*steadyStates(mcs)
## c m
## 0.6666667 0.3333333
## => Number of students taking up Maths = 40 [ANSWER]
C M C 5/6 1/6 M 1/3 2/3Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.