贝叶斯公式

$$ \begin{aligned} P(x|y) = \frac{P(x)P(y|x)}{P(y)} \ P(y) = \sum_x P(y|x)P(x) \end{aligned} $$