I am learning Hidden Markov Models and trying to solve this problem. A Hidden Markov Model has 2 states $\displaystyle \{1,2\}$ and 3 observations $\displaystyle \{a,b,c\}$. The state transition matrix (A), observation matrix (B)and initial matrix ($\displaystyle \pi$) of the model is given below.

$\displaystyle A = \begin{bmatrix}0.9 & 0.1\\ 0.3 & 0.7 \end{bmatrix}$

$\displaystyle B = \begin{bmatrix} 0.3 & 0.4 & 0.3 \\ 0.2 & 0.6 & 0.2\end{bmatrix}$

$\displaystyle \pi =\begin{bmatrix} 0.7 & 0.3 \end{bmatrix} $

(a) if the observation sequence is $\displaystyle \{a,a,b\}$ and the hidden sequence is $\displaystyle \{1,1,2\}$ , calculate the probablity that the next observation is $\displaystyle ``b"$

(b) For question (a), if the next observation is b, what is the probability that the hidden sequence is $\displaystyle \{1,1,2,2\}$

Now I have some questions here. For part (a), using the conditional probability laws, I would have

$\displaystyle P(b | \{a,a,b\}) = \frac{P(\{a,a,b,b\}}{P(\{a,a,b\}}$

Is this correct ?