# Decode the most likely sequence of states for the following sequence

1. A two-state HMM is constructed from the measurements shown below.

The mean length indicates the average time that the HMM stays in the state. Decode the most likely sequence of states (P/Y) for sequence GGCT.

I cannot figure out how to model mean length into HMM. Also, I do not have any transition probabilities. Only emission probabilities are given. Please give an idea how to proceed with this.

• You should probably add the self-study tag (and read its wiki). – GeoMatt22 May 3 '17 at 4:55

Despite being a discrete variable, the number of consecutive residues emitted by an unconstrained hidden state can be modeled by an exponential distribution with rate parameter $\lambda = 1 - a _{ii}$ (where $a _{ii}$ is the transition probability of remaining in the given state). The mean of the exponential distribution is $\lambda^{-1}$, so if the mean number of consecutive residues is 10, then $\lambda$ = 0.1 and $a _{ii}$ = 0.9.

The transition probabilities should satisfy

$\sum\limits{_{j=1}^N} \space a_{ij} = 1$

where $N$ is the total number of states in the model. Therefore the transition probabilities in the two-state model above will be

$a_{PP} = 0.9$

$a_{PY} = 0.1$

$a_{YP} = 0.1$

$a_{YY} = 0.9$