Bayesian Inference Question

2012-11-05 6:34 am
Q4. In country A, 60% of tourists who traveled aboard visited Africa, 25% visited Asia, and the rest visited Europe. Of those who visited Africa, 25% were infected with cholera. Of those who visited Asia, 30% were infected with cholera. Of those who visited Europe, 5% were infected with cholera. If a tourist came back from overseas was diagnosed with cholera, what is the chance that he visited Africa?

Solution
Event A:visited Africa
Event B:diagnosed with cholera

To compute P(A|B)
P(A)60.0000%
P(A')40.0000%
P(B|A)25.0000%
P(B|A')20.6250%
P(B)23.2500%

P(A|B)64.5161%
唔係好明P(B|A')點計到20.6250%

回答 (2)

2012-11-05 11:35 pm
✔ 最佳答案
P(A) = 60%
P(A') = 1 - 60% = 40%
P(B|A) = P(B n A) / P(A) = (25% x 60%) / 60% = 25%

P(B|A')
= P(B n A') / P(A')
= [(30% x 25%) + (5% x 15%)] / 40%
= 20.625%

P(B)
= P(B n A) + P(B n A')
= 25% x P(A) + 20.625% x P(A')
= 25% x 60% + 20.625% x 40%
= 23.25%

P(A|B)
= P(A n B) / P(B)
= 25% x 60% / 23.25%
= 64.5161%

Therefore, the chance that he visited Africa is 64.5161%
2012-11-05 6:44 am
重點是用正規化方法得出當已知旅客不是去非洲時﹐到亞洲和歐洲的機率

P(B|A') = 25/(25 + 15) * 0.3 + 15/(25 + 15) * 0.05 = 0.20625

希望幫到你


收錄日期: 2021-04-25 15:53:16
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20121104000051KK00642

檢視 Wayback Machine 備份