1 \chapter{Probabilistic representation and reasoning (and burglars)
}
2 \section{Formal description
}
3 In our representation of the model we chose to introduce a
\textit{Noisy OR
} to
4 represent the causal independence of
\textit{Burglar
} and
\textit{Earthquake
}
5 on
\textit{Alarm
}. The visual representation of the network is visible in
6 Figure~
\ref{bnetwork21
}
9 \caption{Bayesian network, visual representation
}
12 \includegraphics[scale=
0.5]{d1.eps
}
15 As for the probabilities for
\textit{Burglar
} and
\textit{Earthquake
} we chose
16 to calculate them using days the unit. Calculation for the probability of a
17 \textit{Burglar
} event happening at some day is then this(assuming a gregorian
18 calendar and leap days).
19 $$
\frac{1}{365 +
0.25 -
0.01 -
0.0025}=
\frac{1}{365.2425}$$
21 This gives the following probability distributions visible in
26 \begin{tabular
}{|l|ll|
}
28 &
\multicolumn{2}{c|
}{Earthquake
}\\
30 T & $
0.0027$ & $
0.9972$ \\
31 F & $
0.9973$ & $
0.0027$\\
35 \begin{tabular
}{|l|ll|
}
37 &
\multicolumn{2}{c|
}{Burglar
}\\
39 T & $
0.0027$ & $
0.9973$ \\
40 F & $
0.9973$ & $
0.0027$\\
44 \begin{tabular
}{|l|ll|
}
46 &
\multicolumn{2}{c|
}{$I_1$
}\\
53 \begin{tabular
}{|l|ll|
}
55 &
\multicolumn{2}{c|
}{$I_2$
}\\
62 \begin{tabular
}{|ll|ll|
}
64 &&
\multicolumn{2}{c|
}{Alarm
}\\
65 $I_1$ & $I_2$ & T & F\\
74 \begin{tabular
}{|l|ll|
}
76 &
\multicolumn{2}{c|
}{Watson
}\\
83 \begin{tabular
}{|l|ll|
}
85 &
\multicolumn{2}{c|
}{Gibbons
}\\
92 \begin{tabular
}{|l|ll|
}
94 &
\multicolumn{2}{c|
}{Radio
}\\
97 T & $
0.9998$ & $
0.0002$\\
98 F & $
0.0002$ & $
0.9998$\\
103 \section{Implementation
}
104 This distribution results in the
\textit{AILog
} code in Listing~
\ref{alarm.ail
}
109 \inputminted[linenos,fontsize=
\footnotesize]{prolog
}{./src/alarm.ail
}