.. _MarkovHW: Markov Matrix Homework ======================= City planners use stochastic Markov matrices to analyze trends in land use. Researchers collect data on how each parcel of land is used and track changes. A city conducted such a study and published a Markov matrix showing changes in land use between the years 2015 and 2020. The categories are: #. Residential. #. Office. #. Commercial. #. Parking. #. Vacant. .. math:: \mathbf{M} = \begin{bmatrix} 0.85 & 0.05 & 0.05 & 0.05 & 0.10 \\ 0.02 & 0.55 & 0.20 & 0.10 & 0.10 \\ 0.03 & 0.15 & 0.65 & 0.25 & 0.20 \\ 0.05 & 0.20 & 0.05 & 0.55 & 0.20 \\ 0.05 & 0.05 & 0.05 & 0.05 & 0.40 \end{bmatrix} The columns represent the transition probabilities for the initial usage of the land in 2015. The rows represent the probabilities for the land transitioning to a particular usage in 2020. For example, land that was in residential use in 2015 (column 1) had a 0.85 probability of still being in residential use in 2020 (row 1) and a 0.05 probability of being vacant in 2020 (row 5). Let the ratios of land use in 2015 be as follows. .. math:: \bm{start} = \begin{bmatrix} 0.25 \\ 0.3 \\ 0.2 \\ 0.1 \\ 0.15 \end{bmatrix} :: M = np.array([[0.85, 0.05, 0.05, 0.05, 0.10], [0.02, 0.55, 0.20, 0.10, 0.10], [0.03, 0.15, 0.65, 0.25, 0.20], [0.05, 0.20, 0.05, 0.55, 0.20], [0.05, 0.05, 0.05, 0.05, 0.40]]); print(M) start = np.array([[0.25, 0.3, 0.2, 0.1, 0.15]]).T; print(start) We will assume that the conditions driving the changes are consistent. Use Python to determine the following. See :ref:`markov` as needed. #. Calculate the vectors showing the expected land use in years 2025, 2030, and 2035. Find powers of :math:`\bf{M}` to determine this. #. Find the eigenvectors and eigenvalues of the Markov matrix. #. Calculate the change of basis coefficients needed to express :math:`\mathbf{M}^k \bm{start}` as a sum of products of the eigenvectors and eigenvalues. #. Using the eigenvectors, eigenvalues, and coefficients, calculate (matrix multiplication) the expected land usage in year 2040 (5 sample periods from 2015). #. Using the eigenvectors, eigenvalues, and coefficients, find the steady state land usage.