Generate data using Markov Chain models in Python
2 min readNov 18, 2023
In this short blog post, you will see one way of producing data from a Discrete Time Markov chain in Python. I will not discuss what Markov chains are, so if you are unfamiliar with them, please take a quick look on the internet. The only library used in the code is numpy
.
Now, consider the following Markov chain {Xt, t = 0, 1, 2, . . .} with the transition probability matrix: