# Markov chain

This module requires a single column containing a sequence of nominal data coded as integer numbers. For example, a stratigraphic sequence where 1 means limestone, 2 means shale and 3 means sand. A transition matrix containing counts or proportions (probabilities) of state transitions is displayed. The 'from'-states are in rows, the 'to'-states in columns.

It is also possible to specify several columns, each containing one or more state transitions (two numbers for one transition, *n* numbers for a sequence giving *n*-1 transitions).

The chi-squared test reports the probability that the data were taken from a system with random proportions of transitions (i.e. no preferred transitions). The transitions with anomalous frequencies can be identified by comparing the observed and expected transition matrices.

The 'Embedded (no repeats)' option should be selected if the data have been collected in such a way that no transitions to the same state are possible (data points are only collected when there is a change). The transition matrix will then have zeroes on the diagonal.

The algorithms, including an iterative algorithm for embedded Markov chains, are according to Davis (1986).

#### Reference

Davis, J.C. 1986. Statistics and Data Analysis in Geology. John Wiley & Sons.