# Reconstruct Markov chain based on the sample paths

Given a sample of small finite sequences of transitions between the states of a Markov chain with unknown probabilities how to find the probabilities of transitions between states? Would computing the naive probabilities be a right (best) method? By the naive method I mean to compute the fraction of transitions that went from a given state to one of the possible states?

EDIT/ADDENDUM An example of the MLE approach is as follows: say we have a markov chain with states $S_i$. Let $p_{ij}$ denote the probability of transition between $S_i$ and $S_j$. We would like to attain the MLE estimate for $\hat{p}_{ij}$. Following the reference above it can be show that this is just $\hat{p}_{ij} = \frac{n_{ij}}{\sum\limits_{j=1}^3 n_{ij}}$ where $n_{ij}$ is the total number of observed transitions from $S_i$ to $S_j$. Note that the sum in the denominator is taken over the $j$ indices only. This sum is calculates the total number of state transitions that have departed from $S_i$.