{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Weekly exercise 10: Markov employment transitions\n", "\n", "Consider a worker who, at any given time can be either\n", "\n", "- employed full time (x = 2) \n", "- employed part time (x = 1) \n", "- unemployed (x = 0) \n", "\n", "\n", "Assume that an unemployed worker finds a part time job with probability $ \\alpha $ and full time job with probability $ \\beta < \\alpha $.\n", "\n", "A full time worker may loose their job, or transfer to part time job, with probability $ \\gamma $.\n", "\n", "Further, a part time worker may loose their job, or finds a full time job, with probability $ \\delta $." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Tasks:\n", "\n", "1. Write a function that would return the transition probability matrix given the parameters $ (\\alpha,\\beta,\\gamma,\\delta) $ after making the appropriate checks \n", "1. Assume that initially half of the population has no job, while another half has a full time job. Simulate the distribution of employment states in the following 50 time periods. Use what you think are appropriate values of the parameters. \n", "1. Visualize the evolution of the employment states using an area plot \n", "1. Compute the stationary distribution of employment states. Verify that it coincides with the simulated invariant distribution. \n", "1. Consider an initially unemployed worker. Simulate employment states for this worker for $ N $ periods. Compute the fractions of time the worker is in each state, and make a line plot of the three of these fraction with N on the horizontal axis. Verify that the ergodicity of the invariant distribution. \n", "\n", "\n", "In your work, do not use other than standard scientific libraries (like NumPy and Pandas).\n", "The exercise is inspired by QuantEcon example on [https://python.quantecon.org/finite_markov.html](https://python.quantecon.org/finite_markov.html) which you may find helpful to go though." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "hide-output": false }, "outputs": [], "source": [ "# your code here" ] } ], "metadata": { "date": 1627475014.571282, "filename": "exercise10.rst", "kernelspec": { "display_name": "Python", "language": "python3", "name": "python3" }, "title": "Weekly exercise 10: Markov employment transitions" }, "nbformat": 4, "nbformat_minor": 4 }