條件機率

定義

P(A|B) = |A∩B|/|B|

$P(A|B) = \frac{P(A \cap B)}{P(B)}$

統計獨立性

$P(A \cap B) \ = \ P(A) P(B)$

$P(A|B) \ = \ P(A)$

$P(B|A) \ = \ P(B)$

互斥性

$P(A \cap B) = 0$

$P(A) \ne 0$$P(B) \ne 0$

$P(A\mid B) = 0$
$P(B\mid A) = 0$

其它

• 如果事件$B$的機率$P(B) > 0$，那麼$Q(A) = P(A|B)$在所有事件$A$上所定義的函數$Q$就是機率測度
• 如果$P(B)=0$$P(A|B)$沒有定義。
• 條件機率可以用決策樹進行計算。

形式定義

PX|A(E)=PX(A∩E)/PX(E)。

條件機率謬論

PA|B）與PB|A）的關係如下所示：

$P(B|A) = P(A|B) \frac{P(B)}{P(A)}.$

$P(\text{disease})=1%=0.01$$P(\text{well})=99%=0.99$

$P(\text{positive}|\text{well})=1%$，而且$P(\text{negative}|\text{well})=99%$

$P(\text{negative}|\text{disease})=1%$$P(\text{positive}|\text{disease})=99%$

$P(\text{well}\cap\text{negative})=P(\text{well})\times P(\text{negative}|\text{well})=99%\times99%=98.01%$

$P(\text{disease}\cap\text{positive})=P(\text{disease})\times P(\text{positive}|\text{disease})=1%\times99%=0.99%$

$P(\text{well}\cap\text{positive})=P(\text{well})\times P(\text{positive}|\text{well})=99%\times1%=0.99%$

$P(\text{disease}\cap\text{negative})=P(\text{disease})\times P(\text{negative}|\text{disease})=1%\times1%=0.01%$

$P(\text{positive})=P(\text{well}\cap\text{positive})+P(\text{disease}\cap\text{positive})=0.99%+0.99%=1.98%$

$\scriptstyle P(\text{disease}|\text{positive})=\frac{P(\text{disease}\cap\text{positive})}{P(\text{positive})}=\frac{0.99%}{1.98%}=50%$