2. [30 marks, 15 marks for Grads] This Assignment requires you to write a Python script file called sol2.py to
calculate some inference of a simplified version of the Car repair example from the manuscript. Given is are
the following probabilities:
The marginal probability that the alternator is broken is 1/1000 and the marginal probability that the fan belt
is broken is 2/100. The probability that the battery is charging when either the alternator or the fan belt is
broken is zero. However, even if both are working there is a 5/1000 probability that the battery is not
charging. When the battery is not charging then there is a 90% chance that the battery is flat, though even if
the battery is charging then there is a 10% chance that the battery is flat. Finally, the car does not start if either
the battery is flat, or there is no gas, or the starter is broken. However. Even if these three conditions don't
hold there is a 5% chance that the car won't start.
2.1. Draw the causal model of this system.
2.2. What is the probability that the alternator is broken given that the car won't start?
2.3. What is the probability that the fan belt is broken given that the car won't start?
2.4. What is the probability that the fan belt is broken given that the car won't start and the alternator is
broken?
2.5. What is the probability that the alternator and the fan belt is broken given that the car won't start?
Hint: You might use lea. Lea methods.