Bayes Theorem application -

Ramd

New Member
Hi All,

Below question is getting much popular (its from "Quantitative Methods for Business" by Dennis J. Sweeney, David R. Anderson)". Thought to share.

Prior probabilities if diseases are based on the physician’s assessment of factors such as geographic location, seasonal influences, and occurrence of epidemics. Assume that a patient is believed to have one of two diseases, denoted D1 and d2. With P(D1)=0.60 and P(D2)=0.40, and that medical research shows a probability associated with each symptom that may accompany the diseases. Suppose that given diseases D1 and D2, the probabilities a patient will have symptoms S1, S2, or S3 are as follows

Disease Symptoms
S1 S2 S3
D1 0.15 0.10 0.15 This is p(S3 | D1)
D2 0.80 0.15 0.03

After finding that a certain symptom is present, the medical diagnosis may be aided by finding the revised probabilities the patient has each particular disease. Compute the posterior probabilities of each disease for the following medical findings;

A. The patient has symptom S1
B. the patient has symptom S2
C. The patient has symptom S3
D. For the patient with symptom S1 in part (a), suppose that symptom S2 is present.
What are the revised probabilities of D1 and D2?

Let's have a discussion on it......
 

ShaktiRathore

Well-Known Member
Subscriber
P(D1/S1)*P(S1)=P(D1&S1)=P(S1/D1)*P(D1)
P(D1/S1)=P(S1/D1)*P(D1)/P(S1)....1
P(S1)=[P(S1/D1)*P(D1)+P(S1/D2)*P(D2)]....2
2=> P(S1)=.15*.6+.8*.4=.09+.32=.41
From 1, P(D1/S1)=.15*.6/ .41=.09/.41=.219
P(D2/S1)= P(S1/D2)*P(D2)/P(S1)=.8*.4/.41=.781

Similarly,
P(S2)=[P(S2/D1)*P(D1)+P(S2/D2)*P(D2)]=.1*.6+.15*.4=.06+.06=.12
P(S3)=[P(S3/D1)*P(D1)+P(S3/D2)*P(D2)]=.15*.6+.03*.4=.09+.012=.102
P(D1/S2)=P(S2/D1)*P(D1)/P(S2)=.1*.6/.12=.5
P(D2/S2)=1-.5=.5
P(D1/S3)=P(S3/D1)*P(D1)/P(S3)=.09/.102=.882
P(D2/S3)=1-.882=.118

P(D1/S1&S2)= P(S1&S2/D1)*P(D1)/P(S1&S2)
P(S1&S2)= P(S2&S1/D1)*P(D1)+P(S2&S1/D2)*P(D2)
P(S1&S2)= .15*.1*.6+.8*.15*.4=.09+.048=.138
P(D1/S1&S2)= .15*.1*.6/.138=.652
P(D1/S1&S2)= 1-.652=.348

thanks
 

Ramd

New Member
Hi Shakti,


Below is what I solved:

Prior Probability S1 S2 S3
0.6 0.15 0.1 0.15
0.4 0.8 0.15 0.03


Joint Probability
0.09 0.06 0.09
0.32 0.06 0.012

i.e.

Joint Probability
=0.6*0.15 =0.6*0.1 =0.6*0.15
=0.4*0.8 =0.4*0.15
=0.4*0.03

Total 0.41 0.12
0.102

Postirior Prob.
=0.09/0.41 =0.06/0.12 =0.09/0.102
=0.32/0.41 =0.06/0.12 =0.012/0.102

Hence, the answer will be -
a) 0.22 & 0.78
b) 0.5 & 0.5
c) 0.88 & 0.12

Please suggest....
 

sunny n

Member
Hi Shakti, thanks for the calcs this really helped with a subject that i haven't been able to get my head around.

I had a question when calculating P(S1&S2) you had the following .15*.1*.6=0.09, I'm getting .009. Please clarify I did miss something out
 

ShaktiRathore

Well-Known Member
Subscriber
Yes sunny there was a bit of calculation mistake from my side. you are right thanks for pointing out the mistake will see that from next time i do calculate rightly
P(S1&S2)= .15*.1*.6+.8*.15*.4=.009+.048=.057
P(D1/S1&S2)= .009/.057=0.1579
P(D2|S1&S2)=0.048/0.057=0.8421

thanks
 

patakamuzk

New Member
I had a different approach for solving D but I did get the same solution.

P (D1|S1) | (S2) = .2195 * .1 / (.2195 * .1) + (.7805 * .15)
And I did get the same answers, so I'm guessing my approach is fine, but please comment and let me know if it's okay.
Thanks.
 
Top