{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $X$ be a real random variable on a probability space $(\\Omega, \\mathcal{F}, P)$.\nA median of $X$ is a real number $m$ with\n$$P(X \\le m) \\ge \\frac{1}{2} \\quad \\text{and} \\quad P(X \\ge m) \\ge \\frac{1}{2}.$$\n\n## Remarks\n\nEach real random variable has a median, and the medians form a closed bounded interval. For example, $Q(1/2)$ is a median, where $Q$ is the [[quantile function|0B3Q3XDM5X]].\nThe median can be different from the mean. For the exponential distribution with rate $\\lambda$, the median is $\\ln 2 / \\lambda$ and the mean is $1/\\lambda$.\nFor a fair coin coded as $0$ and $1$, each $m \\in [0, 1]$ is a median.\nFor a sorted data set $x_1 \\le \\dots \\le x_n$ with $n$ odd, the median is $x_{(n+1)/2}$. For $n$ even, one usually takes the mean of the two middle values.\n\n## Explanations\n\n### L1 human\n\nThe median is the middle value: half of the chance lies on each side of it.\nThe median of the incomes in a country is often more useful than the mean.\nA few very large incomes do not move the median much.\n",
  "commit": "545acf83a9b75c8ddc375ef8b23d2ae101a4d7e4",
  "front": {
    "defines": "07Y2E7P9NP",
    "kind": "definition",
    "msc": [
      "60E05"
    ],
    "name": "Median",
    "sources": [
      {
        "locator": "Probability distributions",
        "url": "https://en.wikipedia.org/wiki/Median"
      }
    ],
    "tag": "08W2CW8PKW",
    "uses": [
      "0DKRR22AEQ",
      "0MXMS3AE13"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/08W2CW8PKW/",
  "links": [
    {
      "field": "defines",
      "target": "07Y2E7P9NP"
    },
    {
      "field": "uses",
      "target": "0DKRR22AEQ"
    },
    {
      "field": "uses",
      "target": "0MXMS3AE13"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/08W2CW8PKW.md",
  "msc": [
    "60E05"
  ],
  "name": "Median",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/08W/08W2CW8PKW.md",
  "status": null,
  "tag": "08W2CW8PKW",
  "uri": "m2://08W2CW8PKW",
  "url": "https://math2.tamnd.com/wiki/median-definition/",
  "writing": {
    "tag": "08W2CW8PKW",
    "kind": "definition",
    "level": "W1",
    "next": [
      {
        "what": "edge instance_of in",
        "note": "one example",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge not_instance_of in",
        "note": "one non-example that fails one clause",
        "have": 0,
        "want": 1
      }
    ]
  }
}
