#### Bayesian AI Tutorial: Laboratory Assignment

Ann Nicholson and Kevin Korb

This assignment involves using the Netica (http://www.norsys.com) Bayesian network package to develop models for uncertain reasoning.

This package can be downloaded and installed from the Internet. Note that we have a Monash Educational Site License for Netica. When you first download and run a copy of Netica, you will be asked for a license password to run it in more than Demo mode. (Demo mode does not allow you to save files of more than 15 nodes). The password is available from the lecturer.

#### PART A: The Case of the Missing Car

John and Mary Nguyen arrive home after a night out to find that their second car is not in garage. Two explanations occur to them: either the car has been stolen or their daughter Sam has borrowed the car without permission. The Nguyens know that the rate of car theft in their area is about 1 in 2000 each day, and that if the car was stolen, there is a 95% chance that the garage will show signs of forced entry. (There is nothing else worth stealing in the garage, so assume that if the car isn't stolen, the garage won't show signs of forced entry.) The Nguyens also know that Sam borrows the car without asking about once a week, and that Sam has a busy social life, so even if she didn't borrow the car, there is a 50% chance that she is out.
1. Construct a Bayesian Network using Netica to represent and draw inferences about the case of the missing car.
• First decide what your domain variables are and what values they should take; these will be your network nodes.
• Decide what the causal relationships are between the domain variables and add directed arcs in the network from cause to effect.
• Then you have to add the conditional probabilities for nodes that have parents, and the prior probabilities for nodes without parents. These probabilities should reflect the information you have been given in the question; if the probabilities haven't been given to you explicitly, choose values that seem reasonable and explain why in your documentation.
2. Show the belief of the each variable before adding any evidence. Which nodes in your network are d-separated when there is no evidence added?
3. Add the evidence about the car being missing. After doing belief updating on the network, what are the Nguyen's beliefs that the car has been stolen?
4. After noticing the car is missing, suppose that Mary Nguyen checks the garage and doesn't find any sign of forced entry. What effect does this have on her belief that the car was stolen, that Sam borrowed the car, and that Sam will be home?  Explain your answer in terms of diagnostic, causal and intercausal reasoning.
5. With these two pieces of evidence in your network, which pairs of nodes are d-separated?

#### PART B: Modelling decision making

Paul is thinking about buying a house as an investment. While it looks fine externally, he knows that there may be structural and other problems with the house that aren't immediately obvious. He estimates that there is an 70% chance that the house is really in good condition, with a 30% chance that it could be a real dud. Paul plans to re-sell the house after doing some renovations. He estimates that if the house really is in good condition (i.e., structurally sound), he should make a \$5,000 profit, but if it isn't, he will lose about \$3,000 on the investment. Paul knows that he can get a building surveyor to do a full inspection for \$600. He also knows that the inspection report may not be completely accurate. Paul has to decide whether it is worth it to have the building inspection done, and then he will decide whether or not to buy the house.

Build a decision network to model this problem, using the following steps.

1. Decide what chance nodes are required and what values they should take.
2. This problem is an example of a test-action sequential decision. What will the two decision nodes represent?
3. Decide what the casual relationships are between the chance nodes and add directed arcs to reflect them.
4. Decide what chance nodes Paul's decision may effect and add arcs to reflect that.
5. What is Paul's utility function? What chance nodes (if any) will it depend on? Does it depend on the decision node? Will a single utility node be sufficient?
6. Update the decision network to reflect these modeling decisions.
7. Quantify the relationships in the network through adding numbers for the CPTs (of chance nodes) and the utility table for the utility node. Does the number of parameters required seem particularly large? If so, consider how you might reduce the number of parameters.
8. Once you have built your model, show the beliefs for the chance nodes and the expected utilities for the decisions before any evidence is added.
9. Add different evidence for the "test" result and see how the beliefs and the decision change, if at all.
10. If you have information links between an evidence node and a decision node, view the decision table.
11. Show the decision outcome (including the expected utilities) for the same two evidence cases with a different utility function.

#### PART C: Model your own problem

Think of your own problem involving reasoning with evidence and uncertainty. Write down an English description of the problem, then model it using a Bayesian Network. Try to model a problem that requires a multiply connected network (i.e. not a tree or a polytree). Then try to extend the problem to be a decision problem. This means that you must decide on the possible actions to be presented in the decision node, and decide what the utility node should be a function of.