# What is an example of a second-order markov chain? [closed]

I'd like to see an example of a second-order markov chain. Haven't found one over google or in any of my textbooks

## closed as unclear what you're asking by Did, user91500, S.C.B., Nikunj, MCTMay 14 '16 at 20:08

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

## 2 Answers

The markov property specifies that the probability of a state depends only on the probability of the previous state.

You can "build more memory" into the states by using a higher order Markov model.

In an $n$th order Markov model

$$P(x_i | x_{i-1}, x_{i-2},..., x_1) = P(x_i | x_{i-1},..., x_{i-n} )$$

Example of a second order MC

There is nothing radically different about second order Markov chains: if $P(x_i|x_{i-1},..,x_1)=P(x_i|x_{i-1},..,x_{i-n})$ is a "n-th order Markov chain", we can still interpret it as a first order Markov chain, on the space of combinations of $n$ states, i.e. $S^n$, if $S$ is the set of values $x_i$ takes: just write $P(x_i|x_{i-1},..,x_1)=P(x_i|x_{i-1},..,x_{i-n})=P((x_i,x_{i-1},..,x_{i-n+1})|(x_{i-1},x_{i-2},..,x_{i-n}))$. Thus a second-order markov chain is just one which takes into account the two previous states.