# Test for markov-property in a time-series

Given an (observed) time-series $X_t$ with $X_t\in\{1,...,n\}$, is there a statistical test for testing the null-hypothesis that $P(X_t|X_{t-1},X_{t-2},...,X_1)=P(X_t|X_{t-1})$ (i.e. the markov-property)?

• I think the paper, "Testing for the Markov Property in Time Series" contains useful insight and literature review. – Pardis May 30 '12 at 16:01
• if you want to test the Markovian assumption in isolation, you will have to do something like the paper @Pardis linked. If you want to check this assumption in the context of some kind of model fitting my inclination would be to do something informal like: write down the joint likelihood under the Markovian assumption and fit the model. Next, write down the joint likelihood without the Markovian assumption and re-fit the model. If the estimates are about the same, then nothing is lost by using the Markovian assumption. (I'm making this a comment since it doesn't explicitly answer the question) – Macro May 30 '12 at 16:16
• Great reference from Pardis! Along the lines of what Macro is saying if you fit an AR(1) model to the data and it fits well then in a way that tests the Markov property because AR(1) processes are Markovian. – Michael R. Chernick May 30 '12 at 16:20
• Yes @MichaelCherknick, but there are surely other Markovian models. The AR(1) fitting poorly doesn't tell you the model is not Markovian. – Macro May 30 '12 at 16:22
• @Pardis, 404 on link to "Testing for the Markov Property..." – alancalvitti Jan 16 '20 at 14:53

Great question!! On the top of my head, a consequence of the Markov property, is that conditionally on $X_{t-1}$, $X_t$ is independent of $X_{t-2}$, $X_{t-3}$, ... (this is used in Bayesian networkmodeling).
So you can prove the Markov property if you can prove $P(X_t, X_{t-2}, X_{t-3}, ...|X_{t-1}) = P(X_t | X_{t-1}) P(X_{t-2} X_{t-3}, ....| X_{t-1})$ for every index.
The only case that this will be (relatively easy) is if the variables are multivariate Gaussian. Otherwise it can be quite hard to to implement, especially if you observations are continuous. Still, you can use tests for independence such as $\chi^2$, or more advanced techniques based on Kullback-Leibler divergence as shows in this article for instance.
• I'm afraid I don't quite understand how I would do that. Can you elaborate on how to proceed in practice? Note that I have univariate observations from a discrete set $X_t\in\{1,...,n\}$ for all $t$. Exactly which distribution has to be multivariate gaussian? – thias May 30 '12 at 16:29