Baye's Theorem Tree Diagram PDF
Baye's Theorem Tree Diagram PDF
xD
xxx
x
xx
xx
MA ND
{{
{{{
{
{{
0 CC
CC
CC
CC
MBFF D
FF
FF
FF
ND
Bayes’ Theorem
P(M A ∩ D)
We can now calculate P M AD = =
P(D)
P(M A ∩ D)
. Note the
P DM A · P(M A) + P DM B · P(M B)
event D is shown in red above and the event M A ∩ D is
shown in blue.
rr
D
0.1rrrrr
r
rrr
t
MA ND
0.4ttttt 0.9
tt
ttt
0 JJJ
JJJ
JJJ
0.6 JJ 0.05
MB LL D
LLL
LL
0.95 LLL
ND
Bayes’ Theorem
rr
D
0.1rrrrr
r
rrr
t
MA ND
0.4ttttt 0.9
tt
ttt
0 JJJ
JJJ
JJJ
0.6 JJ 0.05
MB LL D
LLL
LL
0.95 LLL
ND
P(M A ∩ D)
P M A D = =
P(D)
P(M A ∩ D)
=
P D M A · P(M A) + P DM B · P(M B)
P(E1 ∩ F ) P(E1 ∩ F )
P E 1 F = = =
P(F ) P(E1 ∩ F ) + P(E2 ∩ F )
P(E1 )P F E1
.
P(E1 )P F E1 + P(E2 )P F E2
P(F| E 1) P(F| E 1)
F
||
|||
|
|| P(E1) P(E1)
E1 0
F
~~
~~~
~
~~
0 @@ P(E2) P(F| E2)
@@
@@
@@
E2 B F
BB
BB
BB
B
F0
Predictive value of diagnostic test
The above analysis allows us to gain insight a commonly
misunderstood point about the accuracy of tests for
diseases and drugs. The predictive value of a diagnostic
test does not depend entirely on the sensitivity of the test.
It also depend on the prevalence of the disease. Many
people when asked the following question “If a swimmer
fails a drug test that is known to be 95 percent
accurate(whether they have drugs in their system or not),
how likely is it that he/she is really guilty?” will answer 95
percent, but of course you know that you need more
information in order to answer the question. Check out the
following article on the subject:
Doctors flunk quiz on screening-test math
Predictive value of diagnostic test
The above analysis allows us to gain insight a commonly
misunderstood point about the accuracy of tests for
diseases and drugs. The predictive value of a diagnostic
test does not depend entirely on the sensitivity of the test.
It also depend on the prevalence of the disease. Many
people when asked the following question “If a swimmer
fails a drug test that is known to be 95 percent
accurate(whether they have drugs in their system or not),
how likely is it that he/she is really guilty?” will answer 95
percent, but of course you know that you need more
information in order to answer the question. Check out the
following article on the subject:
Doctors flunk quiz on screening-test math
If you are more legally inclined, here is a discussion of
Bayes Theorem as it applies to criminal trials.
Predictive value of diagnostic test
The above analysis allows us to gain insight a commonly
misunderstood point about the accuracy of tests for
diseases and drugs. The predictive value of a diagnostic
test does not depend entirely on the sensitivity of the test.
It also depend on the prevalence of the disease. Many
people when asked the following question “If a swimmer
fails a drug test that is known to be 95 percent
accurate(whether they have drugs in their system or not),
how likely is it that he/she is really guilty?” will answer 95
percent, but of course you know that you need more
information in order to answer the question. Check out the
following article on the subject:
Doctors flunk quiz on screening-test math
If you are more legally inclined, here is a discussion of
Bayes Theorem as it applies to criminal trials.
Let’s see what happens in a few examples.
Predictive value of diagnostic test
Example Suppose, for example a test for the HIV virus is
95% accurate.The test gives a positive result for 95% of
those taking the test who are HIV positive. Also the test
gives a negative result for 95% of those taking the test who
are not HIV positive.
mm A2
mmm
mmm
mmmmm
mmm
A QQQ K2
QQQ
QQQ
QQQ
QQQ
Q
Q2
A2
m
mmm
mmm
mmm
mmmmm
m
06 K QQQ K2
66 QQQ
66 QQQ
QQQ
66 QQQ
66 Q
66 Q2
66
66
66
66
66 m A2
66 mmm
66 mmm
6 mmmmm
m
mmm
Q QQQ K2
QQQ
QQQ
QQQ
QQQ
Q
Q2
General Bayes’ Theorem
In the first round there are 4 + 2 + 2 = 8 cards so the
probabilities in the first round are
m A2
mmm
mmm
mmm
mmm
mmm
A QQQ K2
QQQ
QQQ
QQQ
QQQ
Q
Q2
.5
mm A2
mmm
mmm
mmmmm
0.25 mmm
06 K QQQQ K2
66 QQQ
66 QQQ
66 QQQ
QQQ
66
66 Q2
66
6
0.25 666
66
66 A2
66 mmm
mmm
66 mmm
6 mmmmm
mm
Q QQQ K2
QQQ
QQQ
QQQ
QQQ
Q
Q2
General Bayes’ Theorem
In the second round there are 1 + 4 + 3 + 1 = 9 cards and
the probabilities are different at the various nodes. If you
draw an ace in round 1 the cards are 2 aces, 4 kings and 3
queens so we get
A2
2 mmm
9 mmm
mmm
mmmmm 4
mm 9
A QQQ K2
QQQ
QQQ
QQQ
QQQ
3
Q
9
Q2
.5
mmm
m A2
mmm
mmm
mmm
0.25 mmm
06 K QQQQ K2
66 QQQ
66 QQQ
66 QQQ
QQQ
66
66 Q2
66
6
0.25 666
66
66
mm A2
66 mmm
66 mmm
6 mmmmm
mmm
Q QQQ K2
QQQ
QQQ
QQQ
QQQ
Q
Q2
General Bayes’ Theorem
If you draw a king in round 1 the cards are 1 ace, 5 kings
and 3 queens so we get
A2
2 mmm
9 mmm
mmm
mmmmm 4
mm 9
A QQQ K2
QQQ
QQQ
QQQ
3 QQQ
Q
9
Q2
.5
A2
1 mmm
9mmmmm
mmmm5
m
0.25 mmm 9
06 K QQQQ K2
66 QQQ
66 Q QQQ
66 3 QQQQ
66 9
Q
66 Q2
66
66
0.25 66
66
66
mm A2
66 mmm
66
mm mmm
6 mmm
mmm
Q QQQ K2
QQQ
QQQ
QQQ
QQQ
Q
Q2
General Bayes’ Theorem
If you draw a queen in round 1 the cards are 1 ace, 4 kings
and 4 queens so we get
A2
2 mmm
9 mmmm
mmm
mmm 4
mmm 9
A QQQ K2
QQQ
QQQ
QQQ
QQQ
3
Q
9
Q2
.5
1 mmm
A2
9mmmmm
mmmmm5
0.25 mmm 9
06 K QQQQ K2
66 QQQ
66 QQQ
66 QQQ
3 QQQ
66 9
66 Q2
66
66
0.25 66
66
66 A2
66 1 mmm
9 mmm
66 mmm
6 mmmmm 4
mm 9
Q QQQ K2
QQQ
QQQ
QQQ
4 QQQ
9 Q
Q2
A2
General Bayes’ Theorem mmm
mmm
2
9 mmmm
mm4m
9
mmm
A QQQ K2
QQQ
QQQ
QQQ
QQQ
3
Q
9
Q2
.5
A2
1 mmm
9 mmm
mmm
mmmmm 5
0.25 mm 9
06 K QQQ K2
66 QQQ
66 QQQ
QQQ
66 3 QQQ
66 9
Q
66 Q2
66
6
0.25 666
66
66 A2
66 1 mmm
66 9 mmmm
mmm
6 mmm 4
mmm 9
Q QQQ K2
QQQ
QQQ
QQQ
4 QQQ
9 Q
Q2