# Why is the Hazard function not a pdf?

I am trying to understand why the hazard function is not a PDF. For a random variable T, people often define the PDF of this random variable as:

$$f(t)=\lim_{\delta \to 0} \frac{P(t\leqslant T <t+\delta)}{\delta}$$

By this definition, the hazard should also be a conditional PDF.

$$\lambda(t)=\lim_{\delta \to 0} \frac{P(t\leqslant T < t+\delta \mid T\geqslant t)}{\delta}$$

Seems like the two functions share the same type of definition! They are the limit of a probability. So why is one a PDF and the other not?

I guess is the reason this is not a PDF because the conditioning is not on a single event $T=t$ but rather on $T\geqslant$? If it were on a single event $T=t$, would this be a PDF?

• It can be a constant value for all positive numbers (e.g. for an exponential distribution) and thus, for a start does not necessarily integrate to 1. Commented Apr 13, 2018 at 21:20
• yes that's what led me to realize it is not a pdf. But I am trying to understand whyyy it is not a pdf if the definition looks like its a pdf Commented Apr 13, 2018 at 21:25

The argument of a conditional pdf cannot depend on the conditioning event in any way, shape or form. In $$f_{T\mid A}(t\mid A) = \lim_{\delta\to 0} \frac{P\{t < T \leq t+\delta\mid A\}}{\delta},$$ $A$ can be a fixed event such as $\{T>5\}$ but not something that depends on $t$ such as $\{T > t\}$.

Another important reason why a hazard function $h(t)$ (or any scalar submultiple thereof) cannot possibly be a pdf is that $$\int_0^\infty h(t)\, \mathrm dt = \infty$$ whereas pdfs of lifetimes have more mundane values for their integrals: $$\int_0^\infty f_T(t)\, \mathrm dt = 1.$$

• It is not always the case that the hazard rate has infinite integral. If the integral is finite this just means there is some non-zero probability of infinite survival. In many applications it is assumed that this is impossible, but some applications allow it.
– Ben
Commented Apr 14, 2018 at 7:22
• @Ben Unless otherwise stated most vehemently, most readers would assume that a random variable is a mapping from $Omega$ to $\mathbb R$ (and not to $\mathbb R^+$) and so $\infty$ is not a "value" that a random variable can take on with positive probability. Note that your random variable violates the set-continuity property (equivalent to the Third Axiom) of probability measures. Commented Apr 14, 2018 at 16:38
• @Ben And the readers who do use the extended reals will evaluate the integral of the hazard rate as infinite regardless, because a positive probability of an infinite value gives an infinite expectation. (In other applications where $-\infty$ also has nonzero probability, the integral would be undefined.)
– whuber
Commented Oct 17, 2019 at 13:53
• @Dilip: I think it is preferable to encourage readers not to make that assumption. It is a strange assumption to make. After all, when we deal with essentially the same process with something like a Poisson process, we allow for a Poisson count of zero, which is equivalent to the event never occurring. Another problem is that some readers will encounter a hazard integral that is infinite, and find your assertion that this is impossible confusing. Perhaps you could just stipulate the assumption (or the contrary case) in the answer.
– Ben
Commented Oct 17, 2019 at 21:25
• @Dilip: Also, it is perfectly okay to specify a random variable on $\mathbb{R} \cup \{ \infty \}$; it is just one extra element. It just has some different properties than a real random variable, but so what? Deciding to restrict the range of the random variable prior to consideration of the problem is surely more problematic than just letting the random variable be what it will be.
– Ben
Commented Oct 17, 2019 at 21:30

I think the counterexample Björn suggested is a enough to answer the question. Let me write it out in more detail:

### Björn's Counterexample

Let $T\stackrel{d}{=}\mathrm{Exp}(\lambda)$ for any $\lambda > 0$ then $f_T(t) = \lambda e^{-\lambda t}$ which implies $S(t) = \mathcal{P}(T>t) = 1-(1-e^{-\lambda t}) = e^{-\lambda t}$.

The hazard function can be calculated as $\lambda(t) = \dfrac{f_T(t)}{S(t)} = \dfrac{\lambda e^{-\lambda t}}{e^{-\lambda t}} = \lambda$. (hence the notation $\lambda(t)$ for a hazard function).

Clearly this implies that $\lambda(t)$ is not a probability density function, since $\int_0^{+\infty} \lambda(u) \mathrm{d}u \not = 1$.

The first part of your question was:

`Why is one a pdf and the other not'

As far as I remember, $f_T(t)$ is defined as a pdf if certain conditions hold. One of these conditions is $\int_\Omega f_T(t) \mathrm{d} t =1$. (Which can clearly be violated in the case of $\lambda(t)$).

The density function $f_T(t)$ can be viewed as the limit of a cumulative distribution function in a narrow timeslot, which is what the notation $f_T(t) = \lim_{\delta \to 0} \frac{\mathcal{P}(t\leqslant T<t+\delta)}{\delta}$ suggests. I would not call this the definition since it lacks the conditions.

I guess is the reason this is not a pdf because the conditioning is not on a single event $T=t$ but rather on $T\geqslant t$? If it were on a single event $T=t$, would this be a pdf?

Notice how:

$$\mathcal{P}(t\leqslant T<t+\delta \mid T = t) = 1$$ which implies that conditioning on $T=t$ isn't that usefull.

A conditional probability function $f_{Y\mid X}(y\mid X=x)$ for continious r.v. is defined as $$f_{Y\mid X}(y\mid X=x) = \dfrac{f_{Y,X}(Y=y,X=x)}{f_X(x)}$$ and the hazard function does not fit here. You need (at least) two different random variables. You could look at something like this:

$$f_{T \mid Z}(t\mid Z = 1)$$ for a certain $Z$ as an indicator of treatment or control. Then cleary this is a probability function.

The Hazard function can be equivalently seen as the ratio of the pdf $$f(t)$$ to the survival function $$S(t)$$:

$$\lambda(t)=\lim_{\delta \to 0} \frac{P(t\leqslant T < t+\delta \mid T\geqslant t)}{\delta}$$ by definition of conditional probability: $$=\lim_{\delta \to 0} \frac{P(t\leqslant T < t+\delta \cap T\geqslant t) / P(T \ge t)}{\delta}$$ $$=\lim_{\delta \to 0} \frac{P(t\leqslant T < t+\delta) / P(T \ge t)}{\delta}$$ by definition of $$f(t):$$ $$= \frac{f(t)}{P(T \ge t)}$$ by definition of survival function: $$=\frac{f(t)}{S(t)}$$

Thus since the hazard function is the pdf scaled by the survival function, it will not generally integrate to $$1$$, and hence is not a pdf.