# Data Analysis, Simulation and Visualization for Environmentally Safe Maritime Data
## 3 Theoretical Background  
Bayesian Networks (BNs) [19] provide a powerful probabilistic mechanism for reasoning under conditions of uncertainty. Formally, a BN is a directed acyclic graph (DAG), whose nodes represent a random characteristic of a domain (i.e., a set of mutually exclusive and collectively exhaustive propositions) and its arcs portray causal relationships among features (i.e., a probabilistic dependence between the node and its parents). BNs are both mathematically rigorous and intuitively understandable. They enable an effective representation and computation of the joint probability distribution (JPD) over a set of random variables. The structure of a DAG is defined by two sets: the set of nodes (vertices) and the set of directed edges. The nodes represent random variables and are drawn as circles labeled by the variable names. The edges represent direct dependence among the variables and are drawn by arrows between nodes.  
Consider the following example that illustrates some of the functionalities of BNs. Supposed that the BN, depicted in the following Figure 2 is targeted for a marine modeling expert. The expert wishes to model parameters such as **VesselType**, **Cargo**, **Accident** and **Pollution**. Each one of these parameters contain the listed values:* VesselType: \(\circ\) New \(\circ\) Old
* Cargo: \(\circ\) Dangerous \(\circ\) Not Dangerous
* Accident: \(\circ\) Yes \(\circ\) No
* Pollution: \(\circ\) High \(\circ\) Low  
The structure of this network indicates that Accident is affected by the type of vessel and the cargo they carry. In addition, an accident can cause pollution at a given area. Apart from the structure, the CPT is also depicted, showing the degree of influence of the source node to the target node. By following the BN independence assumption, several statements can be observed:  
* The variables VesselType and Cargo are marginally independent, but when Accident is observed (given) they are conditionally dependent. The type of this relation is often named as _explaining away_.
* When Accident is given, Pollution is conditionally independent of its ancestors VesselType and Cargo.
* Instead of factorizing the joint distribution of all variables using the chain rule, such as P(V,C,A,P) = P(V)P(C! V)P(A! C,V)P(P! A,C,V) the BN defines a compact JPD in a factored form, such as P(V,C,A,P) = P(V)P(C)P(A! V,C)P(P! A). Note that the BN structure reduces the number of model parameters (i.e., the number of rows in the JPD table) from \(2^{4}-1=15\) to only \(8\). This property is of major importance since it allows researchers to create a tractable model of domains with a plethora of attributes.  
Such a reduction provides great benefits from inference, learning (parameter estimation), and computational perspective.  
Figure 2: A toy Bayesian Network for marine traffic modeling.  
When people use BNs, they behave similarly to expert systems, since they allow representing beliefs and knowledge about a specific occurrence. The network represents the knowledge on a thematic area. Given evidence on the presence or absence of other situations, conclusions can be drawn on a particular situation. This important observation allows us to build information retrieval systems that are based on a straightforward probabilistic approach.