{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $s \\ge 1$ and let $x_1, \\ldots, x_N$ be points of $[0,1)^s$.\nFor $t = (t_1, \\ldots, t_s) \\in [0,1]^s$, let $A(t)$ be the number of indices $i$ with $x_i \\in [0,t_1) \\times \\cdots \\times [0,t_s)$.\nThe *star discrepancy* of the points is\n$$D_N^* = \\sup_{t \\in [0,1]^s} \\abs{\\frac{A(t)}{N} - t_1 t_2 \\cdots t_s}.$$\nLet $f \\colon [0,1]^s \\to \\R$ have finite variation $V(f)$ in the sense of Hardy and Krause.\nThen\n$$\\abs{\\frac{1}{N} \\sum_{i=1}^{N} f(x_i) - \\int_{[0,1]^s} f(u) \\, du} \\le V(f) \\, D_N^*.$$\n\n## Remarks\n\nFor $s = 1$ this is Koksma's inequality, and $V(f)$ is the ordinary [[total variation|8QA5DEWNYD]] of $f$ on $[0,1]$.\nIn that case the proof writes the error as a Riemann–Stieltjes integral $\\int_0^1 \\big(A(t)/N - t\\big) \\, df(t)$ by integration by parts, and bounds the integrand by $D_N^*$.\nIn higher dimension the same idea works with a multivariate integration by parts, which produces one term for each face of the cube.\nThe Hardy–Krause variation collects the variations of $f$ on all these faces.\nThe bound separates the two sources of error: $V(f)$ depends only on the integrand, and $D_N^*$ depends only on the points.\nFor a [[low-discrepancy sequence|XSPX1KW9AQ]] such as the [[Halton sequence|54MY2XHVGB]], $D_N^* = O\\big((\\log N)^s / N\\big)$, so the [[quasi-Monte Carlo|ABSRB2KXA6]] error is $O\\big((\\log N)^s / N\\big)$ for every $f$ of finite variation.\nThis beats the rate $N^{-1/2}$ of plain [[Monte Carlo integration|DAR3QJ5H7Y]] for large $N$.\nThe hypothesis of finite variation is needed: the indicator of a ball in $[0,1]^2$ has infinite Hardy–Krause variation, and the bound gives nothing for it.\n\n## Explanations\n\n### L1 human\n\nTo approximate the average of a function over a cube, one averages its values at $N$ sample points.\nThe inequality says the error is at most a product of two numbers.\nOne number measures how much the function wiggles.\nThe other measures how unevenly the points fill the cube.\nSo well-spread points give small errors for every function that does not wiggle too much.\n\n### L2 human\n\nThe inequality is the basic error bound of quasi-Monte Carlo integration.\nIt turns the design of good integration rules into the purely geometric task of finding point sets with small star discrepancy.\nHalton, Sobol and other digital sequences reach $D_N^* = O\\big((\\log N)^s / N\\big)$.\nThe bound is sharp in a worst-case sense.\nBut $V(f)$ is often hard to compute, and it is infinite for simple functions with jumps along surfaces not aligned with the axes.\nVariants replace $D_N^*$ and $V(f)$ by other pairs of dual quantities, for example $L^2$ discrepancy and a Sobolev-type norm.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "ABSRB2KXA6",
      "XSPX1KW9AQ"
    ],
    "kind": "statement",
    "msc": [
      "11K38",
      "65D30",
      "65C05"
    ],
    "name": "Koksma–Hlawka inequality",
    "role": "theorem",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Low-discrepancy_sequence"
      }
    ],
    "tag": "2DSN343YYW",
    "uses": [
      "A8251BHCMP",
      "8QA5DEWNYD",
      "DWJF7ABPR1",
      "XSPX1KW9AQ",
      "54MY2XHVGB",
      "DAR3QJ5H7Y"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/2DSN343YYW/",
  "links": [
    {
      "field": "about",
      "target": "ABSRB2KXA6"
    },
    {
      "field": "about",
      "target": "XSPX1KW9AQ"
    },
    {
      "field": "uses",
      "target": "A8251BHCMP"
    },
    {
      "field": "uses",
      "target": "8QA5DEWNYD"
    },
    {
      "field": "uses",
      "target": "DWJF7ABPR1"
    },
    {
      "field": "uses",
      "target": "XSPX1KW9AQ"
    },
    {
      "field": "uses",
      "target": "54MY2XHVGB"
    },
    {
      "field": "uses",
      "target": "DAR3QJ5H7Y"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/2DSN343YYW.md",
  "msc": [
    "11K38",
    "65D30",
    "65C05"
  ],
  "name": "Koksma–Hlawka inequality",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/2DS/2DSN343YYW.md",
  "status": null,
  "tag": "2DSN343YYW",
  "uri": "m2://2DSN343YYW",
  "url": "https://tamnd.github.io/math2/wiki/koksma-hlawka-inequality/",
  "writing": {
    "tag": "2DSN343YYW",
    "kind": "statement",
    "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
      }
    ]
  }
}
