{
  "aliases": [
    "mean-of-binomial-distribution"
  ],
  "backlinks": null,
  "body": "\n## Statement\n\nLet $n \\ge 1$ be an integer, let $p \\in [0, 1]$, and let $X$ have the [[binomial distribution|0VRWZDWW6B]] $\\operatorname{Bin}(n, p)$. Then\n$$E[X] = \\sum_{k=0}^{n} k \\binom{n}{k} p^k (1 - p)^{n - k} = np.$$\n\n## Remarks\n\nA short proof: $X$ has the same law as $Y_1 + \\dots + Y_n$ with independent [[Bernoulli|0J97P5KZY0]] $Y_i$ with $E[Y_i] = p$. Then [[linearity of expectation|0P7PTC8DDE]] gives $np$.\nA direct proof uses $k \\binom{n}{k} = n \\binom{n-1}{k-1}$ and the binomial theorem.\nThe variance of $X$ is $np(1 - p)$.\n\n## Explanations\n\n### L1 human\n\nIn $n$ trials with success probability $p$, you expect $np$ successes.\nFor $100$ tosses of a fair coin, the expected number of heads is $50$.\n",
  "commit": "6ac761d40018146541484a9e8b9eafd6ecc303dc",
  "front": {
    "aliases": [
      "mean-of-binomial-distribution"
    ],
    "kind": "statement",
    "msc": [
      "60E05"
    ],
    "name": "Expectation with respect to the binomial distribution",
    "role": "proposition",
    "sources": [
      {
        "locator": "Expected value and variance",
        "url": "https://en.wikipedia.org/wiki/Binomial_distribution"
      }
    ],
    "tag": "0PVCTCKD3C",
    "uses": [
      "0VRWZDWW6B",
      "0DCT0QZVQ1",
      "0P7PTC8DDE",
      "0J97P5KZY0"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/0PVCTCKD3C/",
  "links": [
    {
      "field": "uses",
      "target": "0VRWZDWW6B"
    },
    {
      "field": "uses",
      "target": "0DCT0QZVQ1"
    },
    {
      "field": "uses",
      "target": "0P7PTC8DDE"
    },
    {
      "field": "uses",
      "target": "0J97P5KZY0"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0PVCTCKD3C.md",
  "msc": [
    "60E05"
  ],
  "name": "Expectation with respect to the binomial distribution",
  "prov": null,
  "role": "proposition",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0PV/0PVCTCKD3C.md",
  "status": null,
  "tag": "0PVCTCKD3C",
  "uri": "m2://0PVCTCKD3C",
  "url": "https://math2.tamnd.com/wiki/expectation-with-respect-to-the-binomial-distribution/",
  "writing": {
    "tag": "0PVCTCKD3C",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
