我正在为一门关于机器学习的edx课程解答问题。一个特别的问题是给我一个问题:
假设一个病人来到医生的办公室检查他们是否患有某种特定的疾病。试验阳性率为85% (高敏感性):P(test+|disease)=0.85。试验阴性90%为健康人(高特异性):P(试验−健康)=0.90。该疾病在约2%的社区中流行:P(疾病)=0.02,用Bayes定理计算出如果检测阳性的话,你患上此病的概率。
我的解决方案:
我已经做了一张桌子
sick | healthy
2% | 98%
+ 90% | 15%
- 10% | 85%
由此,我计算了这样的bayes定理:
(0,02*0,9)
P(A|B) = -----------------------------------------------------
(0,02*0,9) + (0,15*0,98)
我得到P(A=B)=0,109但是这个答案是错误的,我在哪里做错了?
发布于 2019-08-09 09:32:16
从外观上看,您只是在构建第一个表时翻转了条件概率。P(test+|sick) = 0.85。然而,在你的表和方程中,你认为它是0.90。
因为这件事太短了,我无法给出答案,所以我重新研究了一下:
P(test+|sick)P(sick)
P(sick|test+) = --------------------
P(test+)
如果插入公理:
0.85 * 0.02
P(sick|test+) = -----------
P(test+)
P(test+) = P(test+|sick) *P(病)+ P(test+|healthy) *P(健康):
0.85 * 0.02
P(sick|test+) = ---------------------------------------------------------
P(test+|sick) * P(sick) + P(test+|healthy) * P(healthy)
0.85 * 0.02
P(sick|test+) = --------------------------
0.85 * 0.02 + 0.1 * 0,98
发布于 2019-08-09 09:30:03
Bayes定理:P(A|B) = \frac{P(B|A) P(A)}{P(B)}
在我们的例子中:P(disease|test_+) = \frac{P(test_+|disease) P(disease)}{P(test_+)}
给予:
由于一项测试在病人患病时可能呈阳性,在病人健康时也可能呈阳性,因此,检测阳性的总体概率计算如下:
所以:
因此,在这种情况下,如果你被检测为阳性的话,你得此病的概率大约是14.8%。
https://datascience.stackexchange.com/questions/57296
复制相似问题