Source: http://www.iecl.univ-lorraine.fr/~Philippe.Chassaing/agreg/documents/Markov.pdf