# Are two empirically estimated Markov chains statistically different?

I am constructing Markov chains (with 100 to 200 states) and inferring transition probabilities empirically by simply counting how many times I saw each transition in my raw data (about 20k to 60k transitions per data set). Note that the modest number of transitions and the decent number of state results in average number of measurements per edge being between 1 and 12, thus the errors on most of the inferred transition probabilities are decently high.

From each data set, I construct a Markov chain. Given two Markov chains, I want a statistical test that will tell me if they are the same or not (both trying to approximate the same unknown 'true' Markov chain, or two different ones). Any advice? Any exiting code for this (preferably in Matlab, but R is fine)?

• Estimating the transition matrix from the empirical transitions is terrible if you need to simulate from the estimated matrix, because this induces a lot of zeros. Bayesian estimates are superior in this respect because no entry is zero... Feb 1, 2012 at 21:15