Suppose I have a large training set consisting of many strings of symbols.
$TS = \{Str_0, Str_1, ..., Str_n\}$
$Str_i = \{Sym_0 ... Sym_{len}\}$
These strings of symbols are each generated by the same Variable-order Markov process. Using this training set I can easily compute the needed conditional probability distributions for each symbol given a number of contexts i.e. $P(Sym_i|ctx_j)$ where $ctx_j$ is any subset of a string.
Once I have computed the transition matrix I am interested in computing the probability that some new string of symbols not found in the training set was also generated by the same Markov process. This feels like a goodness-of-fit calculation. Is it? If so what method should I use? If not what is the correct approach? Am I missing something?