{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $N \\ge 0$ be an integer, let $0 \u003c p \u003c 1$, and let $n$ be an integer with $0 \\le n \\le N$.\nWrite $(a)_k$ for the [[Pochhammer symbol|YZHM3HSM0F]].\nThe *Krawtchouk polynomial* of degree $n$ is\n$$K_n(x; p, N) = \\sum_{k=0}^{n} \\frac{(-n)_k \\, (-x)_k}{(-N)_k \\, k!} \\, p^{-k},$$\nthat is, $K_n(x; p, N) = {}_2F_1\\left( -n, -x; -N; \\frac{1}{p} \\right)$.\n\n## Remarks\n\nThe denominators $(-N)_k$ are nonzero because $k \\le n \\le N$.\nThey are orthogonal for the [[binomial distribution|0WCWA1KT3M]]:\n$$\\sum_{x=0}^{N} \\binom{N}{x} p^x (1 - p)^{N - x} K_m(x; p, N) K_n(x; p, N) = \\frac{\\delta_{mn}}{\\binom{N}{n}} \\left( \\frac{1 - p}{p} \\right)^n.$$\nExample: $K_1(x; p, N) = 1 - \\frac{x}{Np}$.\nCheck: if $X$ is binomial with mean $Np$ and variance $Np(1 - p)$, then $E[K_1(X)] = 0$ and $E[K_1(X)^2] = \\frac{Np(1 - p)}{N^2 p^2} = \\frac{1}{N} \\cdot \\frac{1 - p}{p}$.\nNon-example: the clause $n \\le N$ matters; for $n \u003e N$ the formula breaks down at $k = N + 1$, where $(-N)_k = 0$.\nIn coding theory one often uses the version $\\mathcal{K}_k(x) = \\sum_{j=0}^{k} (-1)^j (q - 1)^{k - j} \\binom{x}{j} \\binom{N - x}{k - j}$ for an alphabet of size $q$, which is a constant multiple of $K_k(x; 1 - 1/q, N)$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "CJGKW80KBR",
    "kind": "definition",
    "msc": [
      "33C45",
      "94B25"
    ],
    "name": "Krawtchouk polynomials",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Kravchuk_polynomials"
      }
    ],
    "tag": "B3K63TFVVA",
    "uses": [
      "YZHM3HSM0F",
      "0WCWA1KT3M"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/B3K63TFVVA/",
  "links": [
    {
      "field": "defines",
      "target": "CJGKW80KBR"
    },
    {
      "field": "uses",
      "target": "YZHM3HSM0F"
    },
    {
      "field": "uses",
      "target": "0WCWA1KT3M"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/B3K63TFVVA.md",
  "msc": [
    "33C45",
    "94B25"
  ],
  "name": "Krawtchouk polynomials",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/B3K/B3K63TFVVA.md",
  "status": null,
  "tag": "B3K63TFVVA",
  "uri": "m2://B3K63TFVVA",
  "url": "https://tamnd.github.io/math2/wiki/krawtchouk-polynomials-definition/",
  "writing": {
    "tag": "B3K63TFVVA",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
