{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $S$ be a finite set and let $P$ be the [[transition matrix|0F462493EA]] of an irreducible and aperiodic [[Markov chain|033TJBZDG0]] on $S$.\nLet $\\pi$ be its [[stationary distribution|0KRH5157WP]].\nThe *total variation distance* between probability distributions $\\mu$ and $\\nu$ on $S$ is\n$$\\norm{\\mu - \\nu}_{TV} = \\max_{A \\subseteq S} \\abs{\\mu(A) - \\nu(A)} = \\frac12 \\sum_{x \\in S} \\abs{\\mu(x) - \\nu(x)}.$$\nFor an integer $t \\ge 0$ let $d(t) = \\max_{x \\in S} \\norm{P^t(x, \\cdot) - \\pi}_{TV}$, where $P^t(x, \\cdot)$ is row $x$ of $P^t$.\nFor $\\varepsilon \\in (0, 1)$, the *mixing time* is\n$$t_{\\mathrm{mix}}(\\varepsilon) = \\min\\set{t \\ge 0 : d(t) \\le \\varepsilon},$$\nand $t_{\\mathrm{mix}} = t_{\\mathrm{mix}}(1/4)$.\n\n## Remarks\n\nThe minimum exists because $d(t) \\to 0$ by the [[convergence theorem|B1E1ES1BYD]] for ergodic chains.\nExample: on $S = \\set{1, 2}$ let every entry of $P$ be $1/2$.\nThen $\\pi = (1/2, 1/2)$, $d(0) = 1/2$ and $P^t(x, \\cdot) = \\pi$ for $t \\ge 1$, so $t_{\\mathrm{mix}} = 1$.\nNon-example: for $P = \\begin{pmatrix} 0 \u0026 1 \\\\ 1 \u0026 0 \\end{pmatrix}$ the chain is periodic, $d(t) = 1/2$ for all $t$, and $t_{\\mathrm{mix}}(\\varepsilon)$ does not exist for $\\varepsilon \u003c 1/2$.\nThe function $d$ is nonincreasing, and $t_{\\mathrm{mix}}(\\varepsilon) \\le \\ceil{\\log_2 (1/\\varepsilon)} \\, t_{\\mathrm{mix}}$.\n",
  "commit": "efe85cee8dbc57d85bedbacfb97b99d1b7bee843",
  "front": {
    "defines": "8TV1YW8EXC",
    "kind": "definition",
    "msc": [
      "60J10",
      "60J22"
    ],
    "name": "Markov chain mixing time",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Markov_chain_mixing_time"
      }
    ],
    "tag": "J3D1T7F0CB",
    "uses": [
      "033TJBZDG0",
      "0F462493EA",
      "0KRH5157WP",
      "B1E1ES1BYD"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/J3D1T7F0CB/",
  "links": [
    {
      "field": "defines",
      "target": "8TV1YW8EXC"
    },
    {
      "field": "uses",
      "target": "033TJBZDG0"
    },
    {
      "field": "uses",
      "target": "0F462493EA"
    },
    {
      "field": "uses",
      "target": "0KRH5157WP"
    },
    {
      "field": "uses",
      "target": "B1E1ES1BYD"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/J3D1T7F0CB.md",
  "msc": [
    "60J10",
    "60J22"
  ],
  "name": "Markov chain mixing time",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/J3D/J3D1T7F0CB.md",
  "status": null,
  "tag": "J3D1T7F0CB",
  "uri": "m2://J3D1T7F0CB",
  "url": "https://math2.tamnd.com/wiki/markov-chain-mixing-time-definition/",
  "writing": {
    "tag": "J3D1T7F0CB",
    "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
      }
    ]
  }
}
