# Comparing transition matrices for Markov chains

I have a population, each unit of which exists in one of several states that change over time. I am using first-order Markov chains to model these state transitions.

My population can be segmented into various subpopulations of interest. I've obtained the transition matrices for each of these subpopulations and would like to know if these subpopulations differ from the general population in some principled way.

I don't know of any principled way of comparing transition matrices in this way. Comparing the transition matrices row-wise to that of the general population seems like one approach, but I'm not sure how to go about interpreting this. Another approach might be a spectral/eigendecomposition approach, which is much more readily interpretable to me, but might be harder to squeeze insight/stylised facts from.

I've had a cursory search of the literature without much luck. Any suggestions?

• Continuing your first idea, you can use any discrete-probability distance-metric over the rows. Compare the rows of sub-population to the corresponding rows of the general population using measurements like Total Variation, KL divergence, Wasserstein, Kolmogorov-Smirnoff etc. You can read more to see what method fits you the most. Apr 19, 2017 at 15:13
• Do you know anything about the distribution on states (i.e., what proportion of time is spent in each state)? If so, one way is to do a weighted average of the differences between corresponding row, weighted by the fraction of time spent in the state corresponding to that row. Did this make any sense? Do you have the same set of states for all subpopulations?
– D.W.
Apr 19, 2017 at 23:49
• That does make sense, and is applicable to my case. Thank you. Apr 21, 2017 at 10:41
• What about using the eigenspectrum? It would be more focus on comparing the steady-states and not the transition but it looks to me like a sound solution. Sep 30, 2019 at 9:56
• Does anybody know a scientific paper to support he comparison of Markov Chains using one of these techniques above? Oct 21, 2022 at 13:16

The Frobenius norm, sometimes also called the Euclidean norm (a term unfortunately also used for the vector $$L^2$$-norm), is matrix norm of an $$m \times n$$ matrix $$\mathbf{A}$$ defined as the square root of the sum of the absolute squares of its elements, $$\|\mathrm{A}\|_F \equiv \sqrt{\sum_{i=1}^m \sum_{j=1}^n\left|a_{i j}\right|^2}$$ (Golub and van Loan 1996, p. 55).