Call Us Today! +1-(760)-642-5721|plagfreework@gmail.com
4.9

# 7144CEM Principles of Data Science

## Principles of Data Science Assignment help

(1) Construct a 7Γ7 transition matrix π (as a numpy array) to model the mice moving around the maze as a Markov chain.

(2) Suppose that 50 mice are placed in Room 0 and 90 mice are placed in Room 1. All other rooms are initially empty. Use numpy to calculate how many mice we would expect to see in each room at the end of each time step for each of the next 30 time steps. Use Python to plot your results on a line graph showing one line for each room, together with a legend. Briefly comment on what you observe. You might find numpy.linalg.matrix_power() helpful.

(3) Use numpy to find the eigenvectors of the transition matrix π from part (1), and explain how one of these eigenvectors is related to the number of mice we would expect to see in each room in the βlong-run steady stateβ. Also, for each room π, find the expected number of time steps for a particular mouse initially located in room π to first return to room π. Hint: if ππ is the probability that the particular mouse is in room π in the βlong-run steady stateβ then the expected first return time is given by 1/ππ.

(4) Suppose the mouse population is in the βlong run steady stateβ from part (3) when a large piece of poisoned cheese is placed in Room 6 so that any mouse that enters that room instantly dies.
(a) Modify the transition matrix π from part (1) and estimate the number of time steps until 80% of the mice have died.
(b) The expected number of time steps needed for a mouse starting from room π to reach room π for the first time can be calculated using matrix operations and is denoted πππ. For a particular destination room π, let π be the transition matrix π from part (4)(a) but with row π and column π both deleted, and let πΌ be the 6Γ6 identity matrix. The sum of each column of the matrix (πΌβπ)β1 gives the values πππ. Use this method to find the expected number of time steps needed for a mouse to die, for each of the possible rooms in the maze that the mouse could start from. Briefly comment on what you observe.

By |2023-03-16T09:06:54+00:00March 16th, 2023|Categories: Database assignment help||0 Comments