Skip to content
Sahithyan's S3
1
Sahithyan's S3 — Artificial Intelligence

Bayesian Network

A graphical model that represents the probabilistic relationships among a set of random variables. Uses a directed acyclic graph.

Provides a compact and intuitive representation of joint probability distributions using conditional independence and causal structure.

Represents a random variable.

Each node has a local CPD.

The overall joint probability of all variables is:

P(X1,X2,,Xn)=i=1nP(XiParents(Xi))P(X_1, X_2, \ldots, X_n) = \prod_{i=1}^{n} P(X_i | \text{Parents}(X_i))

Directed links. A link from node XX to node YY means that XX has a direct influence on YY.

Local Conditional Probability Distribution

Section titled “Local Conditional Probability Distribution”

Aka. CPD. A function defining the probability of a variable given its parents.

For a node XiX_i with parents Parents(Xi)\text{Parents}(X_i), the CPD is:

P(XiParents(Xi))P(X_i \,|\, \text{Parents}(X_i))

Specifies the relationship between a node and its parent nodes. Can be continuous or discrete. For discrete variables: represented using conditional probability table (CPT).

A CPT for a boolean variable XiX_i with kk boolean parents has 2k2^k entries.

Aka. JPD. The full joint probability for all variables in the network is the product of local conditional probabilities:

Example:

P(B,E,A,J,M)=P(B)P(E)P(AB,E)P(JA)P(MA)P(B, E, A, J, M) = P(B) \cdot P(E) \cdot P(A|B,E) \cdot P(J|A) \cdot P(M|A)

Here:

  • P(B),P(E)P(B), P(E) is used because B,EB, E has no parents.
  • P(AB,E)P(A|B,E) because AA depends on both BB and EE.
  • P(JA),P(MA)P(J|A), P(M|A) because J,MJ, M depend only on AA.

This decomposition avoids the need to represent all combinations explicitly.

The goal is computing probabilities of interest given evidence.

P(BJ,M)=αEAP(B,E,A,J,M)P(B|J,M) = \alpha \sum_E \sum_A P(B, E, A, J, M)

where α\alpha is a normalization constant ensuring probabilities sum to 1.

This method sums over hidden (unobserved) variables to find the posterior probability.

Relationship TypeStructureIndependence Property
Common causeXYZX ← Y → ZXX and ZZ independent given YY
Common effectXYZX → Y ← ZXX and ZZ dependent given YY
Causal chainXYZX → Y → ZXX and ZZ independent given YY
  • Children are conditionally independent of ancestors given parents.
  • Siblings are conditionally independent given their common parent.
  • Parents are generally not conditionally independent given a child.

Used to test independences in a Bayesian network.

Steps:

  1. List all paths between the 2 variables (ignore arrow direction).
  2. For each path, identify the type of connection at each intermediate node
    • Chain: ABCA → B → C or ABCA ← B ← C
    • Fork: ABCA ← B → C
    • Collider: ABCA → B ← C
  3. Apply blocking rules
    • For chain or fork: path is blocked if middle node is conditioned
    • For collider: path is blocked if both collider and its descendents are not conditioned
  4. They are independent iff all paths between the 2 nodes are blocked.

If every node has at most kk parents, total storage = O(n2k)O(n \cdot 2^k). This is linear in n, compared to O(2n)O(2^n) for the full joint distribution.

More compact than full joint tables.

  • Choose variables relevant to the domain.
  • Decide an ordering of variables (causes before effects preferred).
  • For each variable XiX_i:
    • Add a node for XiX_i.
    • Select minimal parents ensuring conditional independence.
    • Define the CPT for XiX_i.