{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $T$ be a random variable with values in $[0, \\infty)$ that has a [[probability density function|0ZY9DX8FBF]] $f$, and let $S$ be its [[survival function|QTM1HZM53Q]].\nThe *hazard function* of $T$ is defined for all $t \\ge 0$ with $S(t) \u003e 0$ by\n$$h(t) = \\frac{f(t)}{S(t)}.$$\nThe *cumulative hazard function* is $H(t) = \\int_0^t h(u) \\, du$.\n\n## Remarks\n\nAt every point $t$ where $f$ is continuous, the hazard is the limit of a [[conditional probability|0990W5PN13]] per unit time:\n$$h(t) = \\lim_{\\Delta \\downarrow 0} \\frac{P(t \\le T \u003c t + \\Delta \\mid T \\ge t)}{\\Delta}.$$\nSince $h = -S'/S = -(\\log S)'$ there, one gets $S(t) = e^{-H(t)}$, so $h$ determines the distribution of $T$.\n\nExample: for the [[exponential distribution|0E99F51GVB]] with rate $\\lambda$, $f(t) = \\lambda e^{-\\lambda t}$ and $S(t) = e^{-\\lambda t}$, so $h(t) = \\lambda$ is constant and $H(t) = \\lambda t$.\nFor the Weibull distribution with shape $k \u003e 0$ and scale $\\lambda \u003e 0$, $S(t) = e^{-(t/\\lambda)^k}$ and $h(t) = (k/\\lambda)(t/\\lambda)^{k-1}$, which increases when $k \u003e 1$ and decreases when $k \u003c 1$.\n\nNon-example: if $T$ takes only the values $1$ and $2$, each with probability $1/2$, then $T$ has no density and the formula does not apply.\nFor discrete times one uses instead the discrete hazard $P(T = t \\mid T \\ge t)$, here $1/2$ at $t = 1$ and $1$ at $t = 2$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "Y959NKQ3XW",
    "kind": "definition",
    "msc": [
      "62N05",
      "62N01",
      "60E05"
    ],
    "name": "Hazard function",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Failure_rate"
      }
    ],
    "tag": "KRF03HSD44",
    "uses": [
      "QTM1HZM53Q",
      "0ZY9DX8FBF",
      "0990W5PN13",
      "0E99F51GVB"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/KRF03HSD44/",
  "links": [
    {
      "field": "defines",
      "target": "Y959NKQ3XW"
    },
    {
      "field": "uses",
      "target": "QTM1HZM53Q"
    },
    {
      "field": "uses",
      "target": "0ZY9DX8FBF"
    },
    {
      "field": "uses",
      "target": "0990W5PN13"
    },
    {
      "field": "uses",
      "target": "0E99F51GVB"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/KRF03HSD44.md",
  "msc": [
    "62N05",
    "62N01",
    "60E05"
  ],
  "name": "Hazard function",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/KRF/KRF03HSD44.md",
  "status": null,
  "tag": "KRF03HSD44",
  "uri": "m2://KRF03HSD44",
  "url": "https://tamnd.github.io/math2/wiki/hazard-function-definition/",
  "writing": {
    "tag": "KRF03HSD44",
    "kind": "definition",
    "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
      }
    ]
  }
}
