{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\n1. Let $(\\Omega, \\mathcal{F}, P)$ be a [[probability space|0ZYBZ34RT2]] and let $A, B \\in \\mathcal{F}$ with $P(A) \u003e 0$ and $P(B) \u003e 0$.\n2. Since $P(B) \u003e 0$, the definition of [[conditional probability|0FJB06AD2P]] gives $P(A \\mid B) = P(A \\cap B) / P(B)$.\n3. Since $P(A) \u003e 0$, the same definition gives $P(B \\mid A) = P(B \\cap A) / P(A)$.\n4. Multiplying step 3 by $P(A)$ and using $B \\cap A = A \\cap B$ gives $P(A \\cap B) = P(B \\mid A) \\, P(A)$.\n5. Substituting step 4 into step 2 gives $P(A \\mid B) = \\dfrac{P(B \\mid A) \\, P(A)}{P(B)}$.\n\n## Idea\n\nThe probability $P(A \\cap B)$ can be written with a condition on $B$ or with a condition on $A$. Equating the two expressions and dividing by $P(B)$ swaps the roles of the two events.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "62F15"
    ],
    "name": "Proof of Bayes' theorem",
    "proves": "0NM6E9VW04",
    "sources": [
      {
        "locator": "Statement of theorem",
        "url": "https://en.wikipedia.org/wiki/Bayes'_theorem"
      }
    ],
    "tag": "TMXCGXD1JJ",
    "uses": [
      "0ZYBZ34RT2",
      "0FJB06AD2P"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/TMXCGXD1JJ/",
  "links": [
    {
      "field": "proves",
      "target": "0NM6E9VW04"
    },
    {
      "field": "uses",
      "target": "0ZYBZ34RT2"
    },
    {
      "field": "uses",
      "target": "0FJB06AD2P"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/TMXCGXD1JJ.md",
  "msc": [
    "62F15"
  ],
  "name": "Proof of Bayes' theorem",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/TMX/TMXCGXD1JJ.md",
  "status": null,
  "tag": "TMXCGXD1JJ",
  "uri": "m2://TMXCGXD1JJ",
  "url": "https://math2.tamnd.com/wiki/proof-of-bayes-theorem/",
  "writing": {
    "tag": "TMXCGXD1JJ",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
