{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $(X, \\Sigma, \\mu)$ be a [[σ-finite|WEBBT18D4X]] measure space.\nLet $f \\colon X \\to [0, \\infty]$ be a measurable function with [[distribution function|HQVXKEMN5N]] $d_f(t) = \\mu(\\set{f \u003e t})$.\nThen\n$$\\int_X f \\, d\\mu = \\int_0^\\infty d_f(t) \\, dt,$$\nwhere the left side is the [[integral of a non-negative function|DG76G5Z6XW]] and the right side is taken with [[Lebesgue measure|2Z2QVWZ262]].\nMore generally, for $0 \u003c p \u003c \\infty$,\n$$\\int_X f^p \\, d\\mu = p \\int_0^\\infty t^{p-1} d_f(t) \\, dt.$$\n\n## Remarks\n\nThe name comes from the pointwise identity $f(x) = \\int_0^\\infty \\mathbf{1}_{\\set{f \u003e t}}(x) \\, dt$.\nIt writes $f$ as a stack of thin horizontal layers, one for each height $t$.\nIntegrating over $X$ and exchanging the two integrals by Tonelli's theorem gives the formula.\nThe second formula follows in the same way from $f(x)^p = \\int_0^{f(x)} p t^{p-1} \\, dt$.\n\nExample: for $f(x) = x$ on $[0, 1]$ with Lebesgue measure, $d_f(t) = 1 - t$ for $0 \\le t \\le 1$ and $0$ after.\nBoth sides equal $1/2$.\n\nFor a non-negative random variable $Y$ the first formula reads $\\mathbb{E}[Y] = \\int_0^\\infty P(Y \u003e t) \\, dt$.\n\n## Explanations\n\n### L1 human\n\nTo find the volume under a graph, one can slice it vertically or horizontally.\nThe layer cake formula slices horizontally.\nAt each height $t$ it measures the size of the region where the function is above $t$, and then adds these sizes over all heights.\n\n### L2 human\n\nThe formula turns integrals of $f$ into integrals of its distribution function.\nThis is why the $L^p$ norms depend only on $d_f$, so equimeasurable functions and decreasing rearrangements have the same norms.\nIt is the basic tool behind weak $L^p$ estimates, the Marcinkiewicz interpolation theorem and the bounds for the Hardy–Littlewood maximal function.\n",
  "commit": "547b6eddb8f2feb8d579f2d633d22a27b7e132fc",
  "front": {
    "about": [
      "HQVXKEMN5N",
      "DG76G5Z6XW"
    ],
    "kind": "statement",
    "msc": [
      "28A25",
      "46E30"
    ],
    "name": "Layer cake representation",
    "role": "theorem",
    "same_as": {
      "wikidata": "Q6505514",
      "wikipedia": "Layer cake representation"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Layer_cake_representation"
      }
    ],
    "tag": "H78RXJC1K1",
    "uses": [
      "HQVXKEMN5N",
      "DG76G5Z6XW",
      "2Z2QVWZ262",
      "WEBBT18D4X"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/H78RXJC1K1/",
  "links": [
    {
      "field": "about",
      "target": "HQVXKEMN5N"
    },
    {
      "field": "about",
      "target": "DG76G5Z6XW"
    },
    {
      "field": "uses",
      "target": "HQVXKEMN5N"
    },
    {
      "field": "uses",
      "target": "DG76G5Z6XW"
    },
    {
      "field": "uses",
      "target": "2Z2QVWZ262"
    },
    {
      "field": "uses",
      "target": "WEBBT18D4X"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/H78RXJC1K1.md",
  "msc": [
    "28A25",
    "46E30"
  ],
  "name": "Layer cake representation",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/H78/H78RXJC1K1.md",
  "status": null,
  "tag": "H78RXJC1K1",
  "uri": "m2://H78RXJC1K1",
  "url": "https://math2.tamnd.com/wiki/layer-cake-representation/",
  "writing": {
    "tag": "H78RXJC1K1",
    "kind": "statement",
    "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
      }
    ]
  }
}
