Algorithms for Graphical Models (AGM)

Practical 03: Knowledge engineering with Bayesian nets


  1. Getting started with Netica
  2. The red and the green
  3. Thinking about evidence
  4. Winning prizes
  5. Joint distributions and Bayes nets
  6. Conditional independence in Bayes nets

Getting started with Netica

The purpose of this question is to introduce you to Netica, the Bayes net software you will use for some questions in this practical.

  1. Reboot to Windows, if necessary
  2. Start up Netica, you can find it under the 'Modelling' sub-menu.
  3. Find the on-line help. At time of writing the only way of reliably getting this is via the web here
  4. Under Getting Started, select the Quick Tour
  5. Please ignore anything you come across about Decision nodes. Decision theory is not part of this module.
  6. Work through 'Probabilistic Inference' and 'Net Construction'.

The red and the green

Model the card trick with the red and green sided cards using a Bayesian net. Use Netica. Use your Bayesian net to compute the probability distribution over the possible identities of the selected card conditional on the colour you are shown.


Thinking about evidence

A doctor wishes to test one of his/her patients for Blogg's disease which afflicts one person in every 1000. There is a well-developed test for the occurrence of Blogg's disease, so that

The patient gets a positive test result. How likely is it that he/she has Blogg's disease?


Winning prizes

We haven't "covered" this sort of topic in the module - this is just a test of your probabilistic intuition. There's a game show in the US where a prize is hidden behind one of three curtains. Firstly, the contestant chooses one of these curtains. Let's call this curtain A. At this point, at least one of the other curtains, let's call them B and C, does not have a prize behind it. The host then selects one curtain other than the one chosen, and shows the contestant that there is no prize behind it. If the host has a choice of curtains he chooses one at random. Suppose B were the chosen curtain. The contestant can now either stick with their initial guess (A) or switch to the remaining curtain (C). Which should they do to maximise their probability of winning the prize? What are the probabilities of winning the prize with the two strategies?


Joint distributions and Bayes nets

Rewrite P(A,B,C,D,E,F) using the conditional independencies expressed by the following Bayesian net, which we will refer to as NET1 in subsequent questions:

Suppose that all the random variables A-F in NET1 can only have two possible values yes and no. What's the minimum number of probabilities required to fully define the Bayesian net whose structure is given above? (Remember that eg P(E=yes) = 1 - P(E=no).

How many probabilities would be required to define the full joint distribution over A-F, if we could not assume the conditional independencies expressed by the Bayesian net NET1?

NET1

Solution


Conditional independence in Bayesian nets

All these questions refer to the above network NET1.

  1. Is C independent of F conditional on D?
  2. Is C independent of F conditional on D and E?
  3. Write down all pairs of nodes which are guaranteed to be independent of each other.
  4. Which pairs of nodes are guaranteed to be independent of each other given B?
  5. Do we have that: P(A,F|E)= P(A|E)P(F|E)? (ie are A and F independent given E?)

Solution


Last modified: Thu Nov 10 15:54:14 GMT 2011

Valid XHTML 1.1!