Skip to content

Task 3

Question

Part a (Solve before Part b)

George doesn't watch much TV in the evening, unless there is a baseball game on. When there is baseball on TV, George is very likely to watch. George has a cat that he feeds most evenings, although he forgets every now and then. He's much more likely to forget when he's watching TV. He's also very unlikely to feed the cat if he has run out of cat food (although sometimes he gives the cat some of his own food). Design a Bayesian network for modeling the relations between these four events:

  • baseball_game_on_TV
  • George_watches_TV
  • out_of_cat_food
  • George_feeds_cat

Your task is to connect these nodes with arrows pointing from causes to effects.

Part b (Solve after Part a)

You have been given the correct answer for Part A here. You have also been given the conditional probabilties of each variable given it's parents. Calculate P ( not(Baseball Game on TV) | not(George Feeds Cat) ) using Inference by Enumeration

Answer

Part a

Part b

Let's represent
B: Baseball_game_on_TV
G: George_watches_TV
C: out_of_cat_food
F: George_feeds_cat

P(not(Baseball_game_on_TV)not(George_feeds_cat))=P(¬B¬F)

P(not(Baseball_game_on_TV)not(George_feeds_cat))=P(¬B¬F)P(¬F)

P(¬F)=
=P(BGC¬F)
+P(BG¬C¬F)
+P(B¬GC¬F)
+P(B¬G¬C¬F)
+P(¬BGC¬F)
+P(¬BG¬C¬F)
+P(¬B¬GC¬F)
+P(¬B¬G¬C¬F)

=P(B)×P(GB)×P(C)×P(¬FG,C)
+P(B)×P(GB)×P(¬C)×P(¬FG,¬C)
+P(B)×P(¬GB)×P(C)×P(¬F¬G,C)
+P(B)×P(¬GB)×P(¬C)×P(¬F¬G,¬C)
+P(¬B)×P(G¬B)×P(C)×P(¬FG,C)
+P(¬B)×P(G¬B)×P(¬C)×P(¬FG,¬C)
+P(¬B)×P(¬G¬B)×P(C)×P(¬F¬G,C)
+P(¬B)×P(¬G¬B)×P(¬C)×P(¬F¬G,¬C)

=0.304109589×0.927927928×0.169863014×0.958333333
+0.304109589×0.927927928×0.830136986×0.293577982
+0.304109589×0.72072072×0.169863014×0.684210526
+0.304109589×0.72072072×0.830136986×0.041237113
+0.695890411×0.118110236×0.169863014×0.958333333
+0.695890411×0.118110236×0.830136986×0.293577982
+0.695890411×0.8818897644×0.169863014×0.684210526
+0.695890411×0.8818897644×0.830136986×0.041237113 \

=0.243751575

P(¬B¬F)=
=P(¬BGC¬F)
+P(¬BG¬C¬F)
+P(¬B¬GC¬F)
+P(¬B¬G¬C¬F)

=P(¬B)×P(G¬B)×P(C)×P(¬FG,C)
+P(¬B)×P(G¬B)×P(¬C)×P(¬FG,¬C)
+P(¬B)×P(¬G¬B)×P(C)×P(¬F¬G,C)
+P(¬B)×P(¬G¬B)×P(¬C)×P(¬F¬G,¬C) \

=0.125744303

P(¬B¬F)=0.1257443030.243751575
P(¬B¬F)=0.515870730