{
  "aliases": [
    "birthday-paradox"
  ],
  "backlinks": null,
  "body": "\n## Example\n\nAssume that each person has a birthday on one of $365$ days, and that each day is equally likely.\nAssume also that the birthdays of different people are independent.\nLet $p(n)$ be the probability that among $n$ people, at least two have the same birthday.\nBy the [[rule for the complement|0PQEBTYDZM]], for $1 \\le n \\le 365$,\n$$p(n) = 1 - \\frac{365 \\cdot 364 \\cdots (365 - n + 1)}{365^n}.$$\nThen $p(22) \\approx 0.476$ and $p(23) \\approx 0.507$. So $23$ people are enough for a probability above $1/2$.\n\n## Remarks\n\nThe answer is surprising because there are many pairs: $23$ people form $\\binom{23}{2} = 253$ pairs.\nFor $n$ much smaller than $365$, $p(n) \\approx 1 - e^{-n(n-1)/730}$.\nFor $n = 70$, $p(n) \u003e 0.999$. For $n \\ge 366$, $p(n) = 1$ by the pigeonhole principle.\n\n## Explanations\n\n### L1 human\n\nIt is easier to compute the chance that all birthdays are different.\nThe second person must avoid $1$ day, the third person must avoid $2$ days, and so on. These small losses multiply quickly.\n",
  "commit": "f591989ed15704e9d8755a7a5a6426d73de7a3ae",
  "front": {
    "aliases": [
      "birthday-paradox"
    ],
    "kind": "example",
    "msc": [
      "60C05"
    ],
    "name": "Birthday problem",
    "same_as": {
      "wikidata": "Q339000",
      "wikipedia": "Birthday problem"
    },
    "sources": [
      {
        "locator": "Calculating the probability",
        "url": "https://en.wikipedia.org/wiki/Birthday_problem"
      }
    ],
    "tag": "0NMWG2PHJ0",
    "uses": [
      "0AKNPYQ04R",
      "0PQEBTYDZM"
    ]
  },
  "kind": "example",
  "link": "https://math2.tamnd.com/node/0NMWG2PHJ0/",
  "links": [
    {
      "field": "uses",
      "target": "0AKNPYQ04R"
    },
    {
      "field": "uses",
      "target": "0PQEBTYDZM"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0NMWG2PHJ0.md",
  "msc": [
    "60C05"
  ],
  "name": "Birthday problem",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0NM/0NMWG2PHJ0.md",
  "status": null,
  "tag": "0NMWG2PHJ0",
  "uri": "m2://0NMWG2PHJ0",
  "url": "https://math2.tamnd.com/wiki/birthday-problem/",
  "writing": {
    "tag": "0NMWG2PHJ0",
    "kind": "example",
    "level": "W0",
    "next": [
      {
        "what": "edge instance_of or not_instance_of or illustrates out",
        "have": 0,
        "want": 1
      }
    ]
  }
}
