Assignment 2 Solutions
March 1, 2014
Question 2a
1
Question 2b
Part I - Prior Probability
P r(f raud) = P r(f raud|trav)P r(trav) + P r(f raud|¬trav)P r(¬trav)
= 0.01 ∗ 0.05 + 0.004 ∗ 0.95
= 0.0043
Part II - Posterior Probability
OC
t f f1 (OC) = P r(OC)
0.7
0.3
T rav t f t f
f2 (F raud, T rav) = P r(F raud|T rav)
0.01
0.004
0.99
0.996
T rav t f
f3 (T rav) = P r(T rav)
0.05
0.95
OC t f
f4 (OC) = P r(crp|OC)
0.1
0.001
OC t t f f
F raud t f t f
f5 (OC, F raud) = P r(¬ip|OC, F raud)
0.98
0.99
0.989
0.999
T rav t t f f
F raud t f t f
f6 (T rav, F raud) = P r(f p|T rav, F raud)
0.9
0.9
0.1
0.01
F raud t t f f
Eliminate variable T rav: f7 (F raud) = sumoutT rav [f2 (F raud, T rav) ∗ f3 (trav) ∗ f6 (T rav, F raud)]
2
F raud t f
f7 (F raud)
0.0008
0.0540
Eliminate variable OC: f8 (F raud) = sumoutOC [f1 (OC) ∗ f4 (OC) ∗ f5 (OC, F raud)]
F raud t f
f8 (F raud)
0.0689
0.0696
P r(f raud|f p, ¬ip, crp) = k ∗ f7 (f raud) ∗ f8 (f raud) = 0.0150 where k is a normalizing constant: k= 1 f7 (f raud) ∗ f8 (f raud) + f7 (¬f raud) ∗ f8 (¬f raud)
Question 2c
OC
t f F raud t f
f2 (F raud) = P r(F raud|trav)
0.01
0.99
T rav
f3 () = P r(trav)
0.05
OC t f
OC
t t f f f1 (OC) = P r(OC)
0.65
0.35
f4 (OC) = P r(crp|OC)
0.1
0.001
F raud t f t f
f5 (OC, F raud) = P r(¬ip|OC, F raud)
0.98
0.99
0.989
0.999
F raud t f
f6 (F raud) = P r(f p|trav, F raud)
0.9
0.9
3
Eliminate variable OC: f7 (F raud) = sumoutOC [f1 (OC) ∗ f4 (OC) ∗ f5 (OC, F raud)]
F raud t f
f7 (F raud)
0.0696
0.0689
P r(f raud|f p, ¬ip, crp, trav) = k∗f2 (f raud)∗f3 ()∗f6 (f raud)∗f7 (f raud) = 0.0099 where k is a normalizing constant:
1
k=
f2 (F raud) ∗ f3 () ∗ f6 (F raud) ∗ f7 (F raud)
F raud
Question 2d
When an internet purchase is made, the fraud detection system is