% --------------------------------------------------------------
%                         Preamble
% --------------------------------------------------------------

\documentclass[11pt]{article}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{cancel}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{enumitem}

\newcommand{\E}{\mathbb{E}}
\newcommand{\argmin}{\operatornamewithlimits{argmin}}
\newcommand{\argmax}{\operatornamewithlimits{argmax}}

\begin{document}

% --------------------------------------------------------------
%                         Start here
% --------------------------------------------------------------

{\noindent Instructor: \textit{Professor Griffy}\\ Due: \textit{Feb., 17 2022}\\ AECO 701}

\begin{center} \Large Problem Set 2 \end{center} \vspace{1em}

% --------------------------------------------------------------
% --------------------------------------------------------------

\noindent \textbf{Problem 1: Markov Chains}
We can apply Markov Chains in a variety of circumstances that involve dynamics. We will think of a simple ``lake model'' of employment dynamics. There are three states: employed, unemployed, and non-participant (out of the labor force). Denote these as $E$ for employed, $U$ for unemployed, and $N$ for non-participant. The transition probabilities are as follows: $E\rightarrow E$: 0.9; $E\rightarrow U$: 0.1; $E\rightarrow N$: 0.0; $U\rightarrow E$: 0.5; $U\rightarrow U$: 0.5; $U\rightarrow N$: 0.0; $N\rightarrow E$: 0.0; $N\rightarrow U$: 0.0; $N\rightarrow N$: 1.0


\begin{enumerate}[label=\textbf{\alph*})]
\item Write down the transition equation in the following way: $x_{t + 1}' = x_{t}'A$. Define each state in $x$ clearly and denote the transition matrix, $A$, correctly.

\textcolor{blue}{
\noindent We can define the state vector as $x_{t}\; =\; [E_{t}\; U_{t}\; N_{t}]$.\\
Then we can write the transition matrix A as
\begin{align*}
  A &= \begin{bmatrix} 0.9 & 0.1 & 0.0\\
    0.5 & 0.5 & 0 \\
    0.0 & 0.0 & 1.0
  \end{bmatrix}
\end{align*}
}


\item Is there a unique stationary distribution? Why or why not?

\textcolor{blue}{
\noindent No, there is not. If the initial condition is such that all workers start in either the employed or unemployed state, this will yield an stationary distribution. However, any initial conditions in which some share of the population is a non-participant will lead to a different stationary distribution.
}


\item Use a computer programming language to find the ergodic distribution for the following initial condition: $x_{0}' = [0.55\;0.05\;0.4]$. Given an initial condition, is this distribution stationary?

\textcolor{blue}{
\noindent This distribution is stationary, but not unique.
}

\item \textbf{Problem 2: Sectoral Decline}: Suppose now that we are modeling an individual sector in the economy. Over time, this sector's reliance on labor is declining. Unfortunately for workers in this sector, they have a great deal of sector-specific human capital and do not have enough general human capital to find jobs in other sectors. The transition probabilities for $E$ and $N$ remain unchanged, but now the transition probabilities for $U$ are given by $U\rightarrow E$: 0.5; $U\rightarrow U$: 0.45; $U\rightarrow N$: 0.05. Write down the transition equation. Does this have a unique stationary distribution? Use the same initial condition and find the resulting distribution for large $t$.

\textcolor{blue}{
\noindent The transition equation is the same as above, but the matrix A is redefined as
\begin{align*}
  A &= \begin{bmatrix} 0.9 & 0.1 & 0.0\\
    0.5 & 0.45 & 0.05 \\
    0.0 & 0.0 & 1.0
  \end{bmatrix}
\end{align*}
The unique stationary distribution can be determined by inspection. There will be a mass point of unity at non-employment.}

\item Suppose now that the government institutes a worker retraining program. Keeping the probabilities for transitions out of unemployment fixed at their values from part $d$, this new policy makes the transition probabilities from $N$: $N\rightarrow E$: 0.1; $N\rightarrow U$: 0.0; $N\rightarrow N$: 0.9. Use the initial distribution from part (c) and find the distribution for large $t$.

\textcolor{blue}{
\noindent This yields the following A matrix:
\begin{align*}
  A &= \begin{bmatrix} 0.9 & 0.1 & 0.0\\
    0.5 & 0.45 & 0.05 \\
    0.1 & 0.0 & 0.9
  \end{bmatrix}
\end{align*}
simulating this at the starting condition described in part (c) yields a stationary distribution of [0.7857\;0.1429\;0.0714].
}

\item Draw two random series uniformly distributed. To do this, draw 3 numbers from a uniform distributed between 0 and 1. The first number is the (un-normalized) measure of workers starting employed; the second unemployed; the third, non-participant. Normalize by the sum of these three numbers. Simulate the Markov Chain for this series over 1000 periods and plot this series. Repeat this a second time and plot this series again. Discuss the differences between your results.

\textcolor{blue}{
\noindent This yields the following:\\
\includegraphics[width=\textwidth]{./simulation1.png}\\
and\\
\includegraphics[width=\textwidth]{./simulation2.png}
The starting conditions are different, but they converge quickly.
}

\end{enumerate}
% \newpage

% \lstinputlisting[language=Python]{PS1_Solution.py}
% --------------------------------------------------------------
%                         End here
% --------------------------------------------------------------

\end{document}
