I'm a beginner of survival analysis. I think I could understand the Survival Function. But the hazard function, I feel very confuse.
I've been told, the hazard function is the instantaneous risk at a certain time spot. It can be complex if we assume the time is continuous. But if we treat the time as discrete, say, year 1,2,3,4,5. Could we calculate the hazard function directly by using the number of event in the year, divide the survival number at the beginning of the year? For example, there are totally 100 patients. 80 of them didn't die during the first 3 years. Then, 10 of the 80 patients die during year 4. Could we say the hazard (or risk) of year 4 is 10/80? If I'm wrong, please let me know why.


the hazard is defined as $h_{Y}(y)=\frac{f_{Y}(y)}{S_{Y}(y)}$ It neither a density or a probability.

$Y$ is survival time here, and $f_{Y}(y)$ be its probability density function.

From your description we can calculate the survive probability as 80/100=0.8 which is $S_{Y}(y)$. The problem is we do not know what is your pdf, you need to specify your pdf.

  • $\begingroup$ Thanks for your answer. Yes, I read from somewhere else, that hazard is neither a density nor a probability. But for my understanding, it is a instantaneous risk indicator, the higher value the higher risk to die at the moment. And it is possible to have a value >1. But why we could not use 10/80 as the risk indicator for year 4? My purpose is to predict in a new data set, for example, we know 50 patients didn't die in the first 3 years, could we say the probability of those 50 patients die in year 4 is 10/80 too (we don't consider the impact of other attributes, such as age here)? $\endgroup$ – Gang Jun 21 '17 at 22:52
  • $\begingroup$ I mean, I'm not sure the advantage of hazard function in contrast of my 10/80 value. $\endgroup$ – Gang Jun 21 '17 at 22:54
  • $\begingroup$ I would call your 10/80 as cumulative hazard (or cumulative risk) $\endgroup$ – Deep North Jun 22 '17 at 0:25
  • $\begingroup$ Hi Deep North, why it is cumulative hazard(risk)? Could you explain the difference? Please note, I treat the time as discrete. $\endgroup$ – Gang Jun 22 '17 at 5:14
  • $\begingroup$ I don't understand what do you mean discrete time. What I understand for survival analysis is to study the random variable T (time from a start to an events or a censor) which is a continuous variable. The definition of hazard function is all about T and nothing else. $h(t)=\lim_{\Delta t \mapsto 0}\frac{P(t<T \leq t+\Delta t|T>t)}{\Delta t}$ $\endgroup$ – Deep North Jun 22 '17 at 6:48

@Deep North's definition is only valid for continuous survival variables, so it doesn't apply here.

For a discrete survival variable $T$ taking values $s_1<s_2<...$, the hazard of $T$ at $s_j$ is defined as $$p_j=P(T=s_j|T\geq s_j).$$ From the definition $P(A|B)=P(A\cap B)/P(B)$, this equality can be rewritten as $p_j=P(T=s_j)/P(T\geq s_j)$. Therefore in your example, we have $p_4=P(T=4)/P(T\geq 4)=10/80$.

It is worth noting that if we let $f$ be the probability mass function and $S$ be the survival function, then $p_j=\frac{f(s_j)}{S(s_{j-1})}$ for all $j\geq2$ and $p_1=f(s_1)$.

  • $\begingroup$ I would say T(time) is always a continuous variable. $\endgroup$ – Deep North Jun 22 '17 at 0:25
  • $\begingroup$ Well it isn't in Gang's model; he says, "if we treat the time as discrete". $\endgroup$ – xFioraMstr18 Jun 22 '17 at 2:30
  • $\begingroup$ xFioraMstr18, is that mean the hazard for this case (discrete case) is 10/80 for year 4? $\endgroup$ – Gang Jun 22 '17 at 5:18
  • $\begingroup$ Yeah. $p_j$=hazard of $T$ at $s_j$. $\endgroup$ – xFioraMstr18 Jun 22 '17 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.