I'm struggling to understand the statistic relation referring the observations of an HMM. That's clear for me: Output Independence
My problem is how this equation can be derived: probability of an observation given the state sequence
Thanks
I'm struggling to understand the statistic relation referring the observations of an HMM. That's clear for me: Output Independence
My problem is how this equation can be derived: probability of an observation given the state sequence
Thanks
Copyright © 2021 JogjaFile Inc.
Suppose we have an HMM with hidden state sequence $Q_0,Q_1,\dotsc, Q_T$ and observations $O_0,O_1,\dotsc,O_T$ that respect the graph: $$\require{AMScd} \begin{CD} Q_0 @>>> Q_1 @>>> \cdots @>>> Q_{\textit{T-1}} @>>> Q_T \\ @VVV @VVV @. @VVV @VVV \\ O_0 @. O_1 @. @. O_{\textit{T-1}} @. O_T \end{CD} $$ It follows that the joint distribution of these variables takes the form: $$ \textstyle p(q_0,q_1,\dotsc,q_T; o_0, o_1, \dotsc, o_T) = p(q_0) \prod_{i=1}^T p(q_i | q_{i-1}) \prod_{i=0}^T p(o_i | q_i) $$ where: $$ \textstyle p(q_0,q_1,\dotsc,q_T) = p(q_0) \prod_{i=1}^T p(q_i | q_{i-1}). $$ We can then calculate the conditional probability of interest as follows: $$ \begin{aligned} p(o_0, o_1, \dotsc, o_T | q_0,q_1,\dotsc,q_T) &= \frac{p(q_0,q_1,\dotsc,q_T; o_0, o_1, \dotsc, o_T)}{p(q_0,q_1,\dotsc,q_T)} \\ &= \frac{p(q_0) \prod_{i=1}^T p(q_i | q_{i-1}) \prod_{i=0}^T p(o_i | q_i)}{p(q_0) \prod_{i=1}^T p(q_i | q_{i-1})} \\ &= \textstyle \prod_{i=0}^T p(o_i | q_i). \end{aligned} $$