FunLog++ introduction - glossary - language - library - special - semiknown - dynamic
SE1 - SE2 - SE3 - SE4 - SE5 - SE6 - SE7 - SE8 - SE9 - SE10
Semiknown Values (7)
Examples with Bayes Theorem (qualitative symptoms)

 
 prevalence  = 0.2
 sensitivity = 0.8
 unspecificy = 0.1
Prevalence, sensitivity and specificy are used in the Bayes Theorem 
to calculate an aposterior probability p(D|X) where 

                      p(D) * L(X,D)
     p(D|X)  =  ------------------------
                p(D) * L(X,D) + 1 - p(D)
with
                  p(X|D)
     L(X,D)  =  ---------
                p(X|notD)
where
     p(D)      = prevalence
     p(X|D)    = sensitivity
     p(X|notD) = unspecificy = 1 - specificy
 

If binary test is positive then the predictive value (aposteriori probability) becomes
.
 aposteriori = 0.6667 The FunLog++ interpreter calculates the aposteriory probability 
for a postivie test result according to the Bayes theorem.

 
FunLog++ message
Explanation
X      =  "pos",
PXD    =  "pos"@0.8 \/ "neg"@0.2,
PXnotD =  "pos"@0.1 \/ "neg"@0.9,

PD     =  0.2,
PDX    =  bayes(PD,PXD,PXnotD,X),
display( "P(D|X=" # X # ") = " # PDX )

The message on the left hand side calculated the aposteriori probability P(D|X) with respect to sensitivity PXD, unspecificy PXnotD and symptom X. The FunLog++ interpreter evaluates this term and generates an appropriate probability. Click on the message link to see the result of this calculation which is displayed. 
  P(D|X=pos) = 0.6667

 
SE1 - SE2 - SE3 - SE4 - SE5 - SE6 - SE7 - SE8 - SE9 - SE10
FunLog++introduction - glossary - language - library - semiknown - dynamic
Last modification: B. Pohl 22.August 2000 / 07.November 2000