Please help me resolve this problem. Question 5. A Graphical Model. Consider the
ID: 3354784 • Letter: P
Question
Please help me resolve this problem.
Question 5. A Graphical Model. Consider the following model for traf- fic jams around Temple's campus, which we assume can be caused by a car accident or by a visit from the president (and the accompanying security motorcade) P(President ) = 0.01 P(Accident 1 ) 0.1 President Visiting Philadelphia Car Accident on Broad Street Traffic Jam on Campus P(Traffic 1 | President = 0, Accident 0) 0.1 P(Traffic = 1 | President = 0, Accident = 1) = 0.5 P(Traffic 1 | President = 1 . Accidents 0)s 0.6 P(Traffic = 1 | President = 1, Accident = 1) = 0.9 Let "Traffic = 1" stand for the event that there's a traffic jam around campus and "Traffic = 0" stand for the event that there's no traffic am. ·Let "President = 1" stand for the event that the president is visiting Philadelphia and "President-0" for the event that he is not. · Let "Accident = 1" stand for the event that there's a car accident in the vicinity and “Accident = 0" for the event that there is no accident . Assume that the president's visit is independent of there being a car accident (signified by the absence of an edge between the two top nodes in the graph) . Assume that the traffic jam can be caused by either the president's visit or by a car accident (signified by the directed edges in the graph) Answer the questions on the following page. As an aside, note that we've represented the problem by a directed acyclical graph (DAG) annotated by probabilities. This kind of model is called a (directed) Bayesian network. Bayesian networks are at the intersection of modern statistics, machine learning and computer science, and are currently actively being researched. We may cover the basics of Bayesian networks at the end of this course if we have enough timeExplanation / Answer
(a)
P(Traffic = 1 | President = 0, Accident = 0) = 0.1
P(Traffic = 1 | President = 0, Accident = 1) = 0.5
P(Traffic = 1 | President = 1, Accident = 0) = 0.6
P(Traffic = 1 | President = 1, Accident = 1) = 0.9
P(President = 1) = 0.01 => P(President = 0) = 1 - 0.01 = 0.99
P(Accident = 1 ) = 0.1 => P(Accident = 0 ) = 1 - 0.1 = 0.90
P(President = 0, Accident = 0) = P(President = 0) * P(Accident = 0 ) = 0.99 * 0.9 = 0.891
P(President = 0, Accident = 1) = P(President = 0) * P(Accident = 1 ) = 0.99 * 0.1 = 0.099
P(President = 1, Accident = 0) = P(President = 1) * P(Accident = 0 ) = 0.01 * 0.9 = 0.009
P(President = 1, Accident = 1) = P(President = 1) * P(Accident = 1 ) = 0.01 * 0.1 = 0.001
By law of total probability,
P(Traffic = 1 | Accident = 1) = P(President = 0) * P(Traffic = 1 | President = 0, Accident = 1) + P(President = 1) * P(Traffic = 1 | President = 1, Accident = 1)
= 0.01 * 0.5 + 0.99 * 0.9 = 0.896
P(Traffic = 1) = P(President = 0, Accident = 0) * P(Traffic = 1 | President = 0, Accident = 0) + P(President = 0, Accident = 1) * P(Traffic = 1 | President = 0, Accident = 1) + P(President = 1, Accident = 0) * P(Traffic = 1 | President = 1, Accident = 0) + P(President = 1, Accident = 1) * P(Traffic = 1 | President = 1, Accident = 1)
= 0.891 * 0.1 + 0.099 * 0.5 + 0.009 * 0.6 + 0.001 * 0.9 = 0.1449
By Bayes theorem,
P(Accident = 1 | Traffic = 1) = P(Traffic = 1 | Accident = 1) * P(Accident = 1) / P(Traffic = 1)
= 0.896 * 0.1 / 0.1449 = 0.6183575
(b)
P(Accident = 1 | Traffic = 1, President =1) = P(Accident = 1,Traffic = 1, President =1) / P(Traffic = 1, President =1)
P(Traffic = 1 | President = 1, Accident = 1) = 0.9
=> P(Traffic = 1, President = 1, Accident = 1) / P(President = 1, Accident = 1) = 0.9
=> P(Traffic = 1, President = 1, Accident = 1) = 0.9 * P(President = 1, Accident = 1) = 0.9 * 0.001 = 0.0009
Now,
By law of total probability,
P(Traffic = 1 | President = 1) = P(Accident = 0) * P(Traffic = 1 | Accident = 0, President = 1) + P(Accident = 1) * P(Traffic = 1 | Accident = 1, President = 1)
= 0.9 * 0.6 + 0.1 * 0.9 = 0.63
Also, by conditional probability,
P(Traffic = 1 | President = 1) = P(Traffic = 1 , President = 1) / P(President = 1)
=> 0.63 = P(Traffic = 1 , President = 1) / 0.01
=> P(Traffic = 1 , President = 1) = 0.63 * 0.01 = 0.0063
P(Accident = 1 | Traffic = 1, President =1) = P(Accident = 1,Traffic = 1, President =1) / P(Traffic = 1, President =1)
= 0.0009 / 0.0063
= 0.1428571