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?

  • 2
    $\begingroup$ 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. $\endgroup$
    – ehudk
    Commented Apr 19, 2017 at 15:13
  • 3
    $\begingroup$ 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? $\endgroup$
    – D.W.
    Commented Apr 19, 2017 at 23:49
  • $\begingroup$ That does make sense, and is applicable to my case. Thank you. $\endgroup$
    – R Hill
    Commented Apr 21, 2017 at 10:41
  • 1
    $\begingroup$ 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. $\endgroup$
    – Garini
    Commented Sep 30, 2019 at 9:56
  • $\begingroup$ Does anybody know a scientific paper to support he comparison of Markov Chains using one of these techniques above? $\endgroup$ Commented Oct 21, 2022 at 13:16

1 Answer 1


One way to compare the transition matrices of different subpopulations in a Markov chain model is to compute the Frobenius norm of the difference between the matrices. The Frobenius norm is a measure of the distance between two matrices, and it can be used to quantify the difference between the transition matrices of different subpopulations.

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).

To compute the Frobenius norm of the difference between two transition matrices, you first need to compute the difference between the matrices, which can be done by subtracting one matrix from the other. Then, you can compute the Frobenius norm of the difference matrix by taking the square root of the sum of the squares of the elements of the difference matrix.

Once you have computed the Frobenius norm of the difference between the matrices, you can compare this value to a threshold to determine whether the difference is statistically significant. If the norm is larger than the threshold, you can conclude that the transition matrices of the two subpopulations are significantly different from each other.

In terms of interpretation, the Frobenius norm provides a measure of the overall difference between the transition matrices of the two subpopulations. It can be useful for identifying subpopulations that have significantly different state transition patterns from the general population. However, it may be difficult to extract more detailed insights or stylized facts from this measure.

Another approach you might consider is to perform a spectral/eigendecomposition of the transition matrices, which can provide more detailed information about the differences between the matrices. This approach can be more interpretable and might allow you to extract more specific insights about the differences between the subpopulations. However, it may require more advanced mathematical and statistical skills to implement and interpret.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.