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

\documentclass[11pt]{article}

\usepackage{amsmath,amsthm,amssymb}
\usepackage{cancel}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{hyperref}
% \usepackage{listings}
\usepackage{xcolor}
\usepackage{enumitem}
\usepackage[procnames]{listings}

\lstset{language=Python,
        basicstyle=\ttfamily\small,
        keywordstyle=\color{keywords},
        commentstyle=\color{green},
        stringstyle=\color{red},
        showstringspaces=false,
        identifierstyle=\color{black},
        procnamekeys={def,class}}


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

\begin{document}

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

{\noindent Instructor: \textit{Professor Griffy}\\ Due: \textit{Feb., 16th 2023}\\ 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.


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


\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?


\item \textbf{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$.

\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$.

\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.

\end{enumerate}
% \newpage

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

\end{document}
