{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $(x_1, y_1), \\dots, (x_n, y_n)$ be $n \\ge 2$ pairs of real numbers, with $x_1, \\dots, x_n$ distinct and $y_1, \\dots, y_n$ distinct.\nA pair of indices $i \u003c j$ is *concordant* if $(x_i - x_j)(y_i - y_j) \u003e 0$ and *discordant* if $(x_i - x_j)(y_i - y_j) \u003c 0$.\nLet $C$ and $D$ be the numbers of concordant and discordant pairs.\nThe *Kendall rank correlation coefficient* is\n$$\\tau = \\frac{C - D}{n(n-1)/2}.$$\n\n## Remarks\n\nSince every pair is concordant or discordant, $C + D = n(n-1)/2$ and $-1 \\le \\tau \\le 1$.\nFor a pair $(X, Y)$ of [[random variables|0DKRR22AEQ]] with a continuous joint law and an independent copy $(X', Y')$, the population version is $P\\big((X - X')(Y - Y') \u003e 0\\big) - P\\big((X - X')(Y - Y') \u003c 0\\big)$.\n\nExample: $x = (1, 2, 3)$ and $y = (1, 3, 2)$.\nThe pairs $(1, 2)$ and $(1, 3)$ are concordant, and the pair $(2, 3)$ is discordant because $(2 - 3)(3 - 2) \u003c 0$.\nSo $\\tau = (2 - 1)/3 = 1/3$.\n\nNon-example: with ties, for example $y = (1, 1, 2)$, the pair $(1, 2)$ is neither concordant nor discordant, and the clause on distinct values fails.\nVariants such as $\\tau_b$ adjust the denominator for ties.\n\nUnder independence of $X$ and $Y$, the sample $\\tau$ has mean $0$ and variance $2(2n + 5)/(9n(n-1))$, which gives a test of independence.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "DYFY16SFHZ",
    "kind": "definition",
    "msc": [
      "62H20",
      "62G10"
    ],
    "name": "Kendall rank correlation coefficient",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Kendall_rank_correlation_coefficient"
      }
    ],
    "tag": "MXNDW6AFGZ",
    "uses": [
      "0DKRR22AEQ"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/MXNDW6AFGZ/",
  "links": [
    {
      "field": "defines",
      "target": "DYFY16SFHZ"
    },
    {
      "field": "uses",
      "target": "0DKRR22AEQ"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/MXNDW6AFGZ.md",
  "msc": [
    "62H20",
    "62G10"
  ],
  "name": "Kendall rank correlation coefficient",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/MXN/MXNDW6AFGZ.md",
  "status": null,
  "tag": "MXNDW6AFGZ",
  "uri": "m2://MXNDW6AFGZ",
  "url": "https://tamnd.github.io/math2/wiki/kendall-rank-correlation-coefficient-definition/",
  "writing": {
    "tag": "MXNDW6AFGZ",
    "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
      }
    ]
  }
}
