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

 
 prevalence_MI =              0.2
 ck_without_MI = moments([50,34])
 ck_within_MI = moments([200,140])
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 e.g.
     p(D)      = 0.2       (prevalence)
     p(X|D)    = moments([50,34])
                 (semiknown CK within
                 myocardial infarction)
     p(X|notD) = moments([200,140])
                 (semiknown CK without
                 myocardial infarction)

If CK is 120 then the predictive value (aposteriori probability) becomes
.
 aposteriori   =     0.2605 The FunLog++ interpreter calculates the aposteriory probability 
for a CK test result of 100 according to the Bayes theorem.

 
FunLog++ message
Explanation
X      =  90,
PXD    =  moments([190,256]),
PXnotD =  moments([50,36]),

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=100) = 0.0.5803

 
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