{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $G = (V, E)$ be a finite [[directed graph|0KFYGSHHF5]] with no directed cycles, that is, a directed acyclic graph.\nFor $v \\in V$ let $\\operatorname{pa}(v)$ be the set of parents of $v$, the vertices $u$ with an edge $u \\to v$.\nLet $X = (X_v)_{v \\in V}$ be random variables with a joint density or probability mass function $p$.\nThen $X$ is a *Bayesian network* with respect to $G$ if\n$$p(x) = \\prod_{v \\in V} p(x_v \\mid x_{\\operatorname{pa}(v)})$$\nfor all $x$, where $p(x_v \\mid x_{\\operatorname{pa}(v)})$ is the [[conditional density|0ZN9EZTEM6]] of $X_v$ given $X_{\\operatorname{pa}(v)}$.\n\n## Remarks\n\nThe factorisation is equivalent to the local Markov property.\nEach $X_v$ is [[conditionally independent|0THJ7416DX]] of its non-descendants given its parents.\nExample: for the chain $A \\to B \\to C$, the definition asks $p(a, b, c) = p(a) p(b \\mid a) p(c \\mid b)$.\nDividing by $p(b)$ gives $p(a, c \\mid b) = p(a \\mid b) p(c \\mid b)$, so $A \\perp C \\mid B$.\nNon-example: the graph $A \\to B \\to A$ has a directed cycle, so it does not define a Bayesian network; a product $p(a \\mid b) p(b \\mid a)$ is in general not a joint distribution.\nDifferent graphs can give the same model: $A \\to B \\to C$ and $A \\leftarrow B \\leftarrow C$ both encode exactly $A \\perp C \\mid B$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "21JT983G60",
    "kind": "definition",
    "msc": [
      "62H22",
      "68T37"
    ],
    "name": "Bayesian network",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Bayesian_network"
      }
    ],
    "tag": "G2XY7J2Z5Q",
    "uses": [
      "Q3FQAD1BXG",
      "0KFYGSHHF5",
      "0ZN9EZTEM6",
      "0THJ7416DX"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/G2XY7J2Z5Q/",
  "links": [
    {
      "field": "defines",
      "target": "21JT983G60"
    },
    {
      "field": "uses",
      "target": "Q3FQAD1BXG"
    },
    {
      "field": "uses",
      "target": "0KFYGSHHF5"
    },
    {
      "field": "uses",
      "target": "0ZN9EZTEM6"
    },
    {
      "field": "uses",
      "target": "0THJ7416DX"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/G2XY7J2Z5Q.md",
  "msc": [
    "62H22",
    "68T37"
  ],
  "name": "Bayesian network",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/G2X/G2XY7J2Z5Q.md",
  "status": null,
  "tag": "G2XY7J2Z5Q",
  "uri": "m2://G2XY7J2Z5Q",
  "url": "https://tamnd.github.io/math2/wiki/bayesian-network-definition/",
  "writing": {
    "tag": "G2XY7J2Z5Q",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
