{
  "aliases": null,
  "backlinks": [
    {
      "field": "defines",
      "target": "A02K3MKQ3Q"
    },
    {
      "field": "uses",
      "target": "MECCMT61DV"
    }
  ],
  "body": "\n## Summary\n\nThe Metropolis–Hastings algorithm is a [[Markov chain Monte Carlo|ZGNBR2SPZ0]] method.\nIt turns an arbitrary proposal mechanism into a [[Markov chain|0G48PYM96Q]] with a prescribed stationary distribution $\\pi$.\nAt each step a candidate move is proposed and then accepted or rejected with a probability chosen to enforce [[detailed balance|CTGN6CK1ZS]].\nOnly ratios $\\pi(y)/\\pi(x)$ enter, so the normalising constant of $\\pi$ is never needed.\n\n## Explanations\n\n### L1 human\n\nThe chain sits at a state and suggests a new state at random.\nIf the new state is more likely under $\\pi$, the move is usually taken; if it is less likely, the move is taken only sometimes.\nRejected moves keep the chain where it is.\nThis balance of moves up and down in probability makes the chain spend time in each state in proportion to $\\pi$.\nFor instance, with a symmetric proposal and $\\pi(y) = \\pi(x)/2$, a move from $x$ to $y$ is accepted half the time.\n",
  "commit": "547b6eddb8f2feb8d579f2d633d22a27b7e132fc",
  "front": {
    "kind": "concept",
    "msc": [
      "65C05",
      "60J22",
      "65C40"
    ],
    "name": "Metropolis–Hastings algorithm",
    "same_as": {
      "wikidata": "Q910810",
      "wikipedia": "Metropolis–Hastings algorithm"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Metropolis%E2%80%93Hastings_algorithm"
      }
    ],
    "specializes": [
      "ZGNBR2SPZ0"
    ],
    "tag": "MKHF449E22"
  },
  "kind": "concept",
  "link": "https://math2.tamnd.com/node/MKHF449E22/",
  "links": [
    {
      "field": "specializes",
      "target": "ZGNBR2SPZ0"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/MKHF449E22.md",
  "msc": [
    "65C05",
    "60J22",
    "65C40"
  ],
  "name": "Metropolis–Hastings algorithm",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/MKH/MKHF449E22.md",
  "status": null,
  "tag": "MKHF449E22",
  "uri": "m2://MKHF449E22",
  "url": "https://math2.tamnd.com/wiki/metropolis-hastings-algorithm/",
  "writing": {
    "tag": "MKHF449E22",
    "kind": "concept",
    "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
      }
    ]
  }
}
