= Solution
Let $Z_t$ be the hidden state. With the usual convention $\alpha_t(i)=P(o_1,\ldots,o_t,Z_t=i)$ and $\beta_t(i)=P(o_{t+1},\ldots,o_T\mid Z_t=i)$, the <Markov property> and the <conditional independence> of emissions factor the joint probability as
$$
\begin{aligned}
&P(O,Z_t=i,Z_{t+1}=j,Z_{t+2}=k)\\
&\qquad=\alpha_t(i)\,a_{ij}\,b_j(o_{t+1})\,a_{jk}\,b_k(o_{t+2})\,\beta_{t+2}(k).
\end{aligned}
$$
The requested state-path probability after observing the complete data is the corresponding <conditional probability>:
$$
\boxed{P(Z_t=i,Z_{t+1}=j,Z_{t+2}=k\mid O)=\frac{\alpha_t(i)a_{ij}b_j(o_{t+1})a_{jk}b_k(o_{t+2})\beta_{t+2}(k)}{P(O)}}.
$$
Here the <forward algorithm> and <backward algorithm> give the same normalizer at any interior time,
$$
P(O)=\sum_r\alpha_t(r)\beta_t(r).
$$
There is no extra factor $b_i(o_t)$: it is already included in $\alpha_t(i)$. If an unconditioned joint probability with the observations is intended, it is the numerator alone. Summing the boxed expression over all $i,j,k$ gives one.
Back to article page