ベイズの定理
Substituting using Bayes' theorem gives the law of total probability