7144CEM Principles of Data Science

    Need Solution - Download from here



    7144CEM Assignment Help

    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|Tags: |0 Comments

    Leave A Comment