程序代写代做代考 chain python Python Homework 2¶

Python Homework 2¶
Release date: Monday, January 27 
Due date: Friday, February 7, 11:59 p.m. via GauchoSpace
Instruction: Please upload your jupyter notebook on GauchoSpace with filename “PythonHW2_YOURPERMNUMBER.ipynb”.

Load some packages:
In [ ]:
import numpy as np
import matplotlib.pyplot as plt

Problem 1 (10 Points)¶
Consider the continuous-time Registration Line Markov Chain from Example 2.10. It will be discussed in class on Wednesday, January 29 (cf. also Dobrow, Example 7.5 on pp. 271f.).
1. Implement a simulation of this Markov chain on the time interval $[0,60]$.
In [ ]:
# WRITE YOUR OWN CODE HERE! FEEL FREE TO INSERT MORE CELLS!
# ADD SOME COMMENTS TO YOUR CODE!

1. Plot a trajectory of this Markov Chain on $[0,60]$ by using your code from 1.
Hint: You can use the ply.hlines() command to plot horizontal lines (check also the documentation online).
In [ ]:
# WRITE YOUR OWN CODE HERE! FEEL FREE TO INSERT MORE CELLS!
# ADD SOME COMMENTS TO YOUR CODE!