$\mathbb{P}\left(A\mid B\right)=\frac{\mathbb{P}\left(B\mid A\right)\mathbb{P}\left(A\right)}{\mathbb{P}\left(B\right)}$

$\mathbb{P}\left(A\mid B\right)=\frac{\mathbb{P}\left(B\mid A\right)\mathbb{P}\left(A\right)}{\mathbb{P}\left(B\mid A\right)\mathbb{P}\left(A\right)+\mathbb{P}\left(B\mid \stackrel{‾}{A}\right)\mathbb{P}\left(\stackrel{‾}{A}\right)}$

• $B$表示事件“檢測結果呈陽性”
• $\stackrel{‾}{B}$表示事件“檢測結果呈陰性”
• $A$表示事件“疾病患者”
• $\stackrel{‾}{A}$表示事件“非疾病患者”

• $\mathbb{P}\left(A\right)=2%$
• $\mathbb{P}\left(\stackrel{‾}{A}\right)=98%$
• $\mathbb{P}\left(B\mid A\right)=97%$
• $\mathbb{P}\left(B\mid \stackrel{‾}{A}\right)=9%$

$A$ (2%) $\stackrel{‾}{A}$ (98%)
$B$ 真陽性 $\begin{array}{rl}\mathbb{P}\left(B\cap A\right)& =\mathbb{P}\left(A\right)×\mathbb{P}\left(B\mid A\right)\\ & =2%×97%\\ & =1.94%\end{array}$ 假陽性 $\begin{array}{rl}\mathbb{P}\left(B\cap \stackrel{‾}{A}\right)& =\mathbb{P}\left(\stackrel{‾}{A}\right)×\mathbb{P}\left(B\mid \stackrel{‾}{A}\right)\\ & =98%×9%\\ & =8.82%\end{array}$
$\stackrel{‾}{B}$ 假陰性 $\begin{array}{rl}\mathbb{P}\left(\stackrel{‾}{B}\cap A\right)& =\mathbb{P}\left(A\right)×\mathbb{P}\left(\stackrel{‾}{B}\mid A\right)\\ & =2%×3%\\ & =0.06%\end{array}$ 真陰性 $\begin{array}{rl}\mathbb{P}\left(\stackrel{‾}{B}\cap \stackrel{‾}{A}\right)& =\mathbb{P}\left(\stackrel{‾}{A}\right)×\mathbb{P}\left(\stackrel{‾}{B}\mid \stackrel{‾}{A}\right)\\ & =98%×91%\\ & =89.18%\end{array}$

$\frac{1.94%}{1.94%+8.82%}=18.03%$

$\begin{array}{rl}\mathbb{P}\left(A\mid B\right)& =\frac{\mathbb{P}\left(B\mid A\right)\mathbb{P}\left(A\right)}{\mathbb{P}\left(B\mid A\right)\mathbb{P}\left(A\right)+\mathbb{P}\left(B\mid \stackrel{‾}{A}\right)\mathbb{P}\left(\stackrel{‾}{A}\right)}\\ & =\frac{97%×2%}{\left(97%×2%\right)+\left(9%×98%\right)}\\ & =\frac{1.94%}{1.94%+8.82%}\\ & =\frac{1.94%}{10.76%}\\ & =18.03%\end{array}$

• 19人檢測結果為真陽性
• 1人檢測結果為假陰性
• 88人檢測結果為假陽性
• 892人檢測結果為真陰性