Source: https://www.statslab.cam.ac.uk/~rrw1/markov/M.pdf