# 推导1

## $$\gamma\_t(i)$$的推导

$$\gamma\_t(i)$$代表t时刻状态为i的概率。

用公式表达为：

$$
\begin{aligned}
\gamma\_t(i)  & = P(i\_t = q\_i | O, \lambda) \\
& = \frac{P(i\_t = q\_i , O| \lambda)}{P(O|\lambda)} & \text{贝叶斯公式,}P(A|B) = \frac{P(A, B)}{P(B)} \\
& = \frac{P(i\_t = q\_i , O| \lambda)}{\sum\_{j=1}^NP(i\_t = q\_i , O| \lambda)} \\
& = \frac{\alpha\_t(i)\beta\_t(i)}{\sum\_{j=1}^N\alpha\_t(i)\beta\_t(i)} & \text{公式说明1}
\end{aligned}
$$

**公式说明**

1. 根据[前向概率$$\alpha\_t(i)$$](https://windmising.gitbook.io/lihang-tongjixuexifangfa/hmm/3)和[后向概率$$\beta\_t(i)$$](https://windmising.gitbook.io/lihang-tongjixuexifangfa/hmm/4)的字义，得： &#x20;

   $$
   \begin{aligned}
   \alpha\_t(i)\beta\_t(i) & = P(o\_1,o\_2,\cdots,o\_t,i\_t=q\_i|\lambda) \* P(o\_{t+1},o\_{t+2},\cdots,o\_T |i\_t=q\_i, \lambda) \\
   & = P(o\_1,o\_2,\cdots,o\_t|i\_t=q\_i, \lambda) \* P(o\_{t+1},o\_{t+2},\cdots,o\_T |i\_t=q\_i, \lambda)  \* P(i\_t=q\_i|\lambda)  \\
   & = P(O|i\_t=q\_i, \lambda)  \* P(i\_t=q\_i|\lambda) \\
   & = P(O, i\_t=q\_i| \lambda)
   \end{aligned}
   $$

   我的推导方法可能比较笨。

## $$\xi\_t(i,j)$$的推导


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://windmising.gitbook.io/lihang-tongjixuexifangfa/hmm/8.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
