From an Exponential Hazard to Survival at a Fixed Time
In a time-to-event trial, a clinically meaningful question is often whether the probability of remaining event-free through a specified time is high. Under an exponential event-time model, that survival probability is determined by the hazard. The posterior for the hazard can therefore be translated directly into a posterior distribution for survival at any prespecified time.
This tutorial uses the Gamma posterior update for an exponential hazard and the right-censored likelihood. The focus here is the transformation from hazard uncertainty to uncertainty about survival. The time \(t\) is fixed in advance and measured in the same units as the observed follow-up times.
For right-censored observations, let \(y_i\) be the observed time for participant \(i\), the smaller of event time and censoring time, and let \(\delta_i=1\) if the event was observed and \(0\) otherwise. Define the total observed follow-up \(T=\sum_i y_i\) and event count \(D=\sum_i\delta_i\). Under independent exponential event times and censoring that is noninformative for the event-time model, the likelihood for \(\lambda\) is proportional to \(\lambda^D\exp(-\lambda T)\). With a Gamma prior in shape-rate form, \(\lambda\sim\operatorname{Gamma}(a,b)\), the posterior is \(\operatorname{Gamma}(a+D,b+T)\). Here \(b\) and \(T\) have units of time, so the hazard has units of inverse time.
Transforming the Posterior
Write the posterior as \(\lambda\mid\text{data}\sim\operatorname{Gamma}(a',b')\), where \(a'=a+D\) and \(b'=b+T\). Since \(S(t)=\exp(-t\lambda)\) decreases as \(\lambda\) increases, higher hazards correspond to lower survival probabilities. This reversal is important when calculating quantiles and intervals.
The CDF follows by solving the inequality: \(\exp(-t\lambda)\leq s\) is equivalent to \(\lambda\geq-\log(s)/t\). Taking that upper-tail probability gives the expression above. For posterior hazard quantiles \(q_p\), defined by \(P(\lambda\leq q_p\mid\text{data})=p\), the survival quantile is
Consequently, a central 95% credible interval for survival is obtained by transforming the hazard's 97.5th percentile for its lower endpoint and its 2.5th percentile for its upper endpoint:
The reversal is a direct consequence of the decreasing transformation; it is not a special convention for survival analysis. A useful additional summary is the posterior mean survival. Integrating \(\exp(-t\lambda)\) against a Gamma posterior gives its Laplace transform:
To see this, multiply the Gamma density, proportional to \(\lambda^{a'-1}\exp(-b'\lambda)\), by \(\exp(-t\lambda)\). The resulting integral is the Gamma normalizing integral with rate \(b'+t\), divided by the original one with rate \(b'\), yielding the stated ratio. This is the posterior mean of the survival parameter at time \(t\); it is not generally the same as survival evaluated at the posterior mean hazard.
Worked Example: A 95% Credible Interval After Right Censoring
Suppose a hypothetical trial has \(D=3\) observed events and \(T=20\) patient-years of total follow-up. Use the prior \(\lambda\sim\operatorname{Gamma}(2,4)\), with rate measured in years, and assess survival at \(t=2\) years. The exponential model assumes a constant hazard, and the likelihood treats the censoring as noninformative for event time.
The posterior is \(\operatorname{Gamma}(2+3,4+20)=\operatorname{Gamma}(5,24)\), so the posterior hazard is measured in events per patient-year. For a Gamma distribution with shape 5, its quantiles can be obtained by dividing the corresponding chi-square quantiles with 10 degrees of freedom by \(2(24)=48\). Using chi-square quantiles 3.247 and 20.483 gives
Transform in reversed order for the survival interval:
Thus, conditional on this model and prior, the 95% posterior credible interval for the probability of surviving beyond 2 years is approximately 0.426 to 0.874. The interval describes posterior uncertainty about the survival probability, not a 95% probability statement about a fixed parameter after observing the data.
Worked Uses of the Posterior Distribution
Worked Example: An Exact Posterior Distribution With No Observed Events
Consider hypothetical right-censored trial data with no observed events and \(T=4\) patient-years of follow-up. Let the prior be \(\lambda\sim\operatorname{Gamma}(1,6)\), with time measured in years, and evaluate survival at 5 years. Assume independent exponential event times and noninformative censoring. The posterior is \(\operatorname{Gamma}(1,10)\), which is an exponential distribution for \(\lambda\) with rate 10 per year.
For \(0<s<1\), the transformed CDF is
The induced density is \(2s\), so this is a Beta distribution with shape parameters 2 and 1. Its mean is \(2/3=0.667\). Its 2.5th and 97.5th percentiles solve \(s^2=0.025\) and \(s^2=0.975\), respectively:
This wide interval reflects substantial uncertainty: zero observed events does not establish that the hazard is zero. The posterior remains informed by both the prior and the four patient-years of follow-up.
Worked Example: Posterior Probability of Exceeding a Survival Target
Suppose a hypothetical right-censored trial yields \(D=1\) event and \(T=5\) patient-years, with prior \(\lambda\sim\operatorname{Gamma}(2,10)\). Under a constant hazard and noninformative censoring, the posterior is \(\operatorname{Gamma}(3,15)\). At 3 years, consider the probability that survival exceeds 0.80.
Because \(S(3)=\exp(-3\lambda)\), the target \(S(3)>0.80\) is equivalent to
For a Gamma distribution with integer shape 3 and rate 15, its CDF at \(x\) is \(1-\exp(-15x)[1+15x+(15x)^2/2]\). Substituting \(x=0.07438\) gives \(15x=1.1157\) and
The posterior probability that survival through 3 years exceeds 0.80 is therefore about 10.3%. This probability concerns the survival parameter under the model, not the probability that a particular participant will survive 3 years.
Assumptions, Diagnostics, and Alternatives
The transformation is exact under the assumed model, but it cannot repair a poor model for the event times. The exponential model requires a constant hazard over the time range of interest. For example, a hazard that rises steadily after treatment begins or changes abruptly at a known time may make a single \(\lambda\) inadequate. Inspect event-time patterns and compare model-implied survival behavior with the observed follow-up; systematic departures, especially patterns consistent with a changing hazard, warn against relying on this posterior without a more suitable model. The censoring mechanism must also be noninformative for the event process in the likelihood being used. If participants are censored for reasons related to their unobserved event risk, this simple likelihood may not represent the data-generating process.
The time \(t\) must be chosen and reported clearly, with consistent units. A hazard in events per year must be multiplied by time in years; mixing years and months changes the result. Numerical calculations should also respect the reversed quantiles. As a basic check, the transformed interval endpoints must lie between 0 and 1, and the lower endpoint must not exceed the upper one.
A plug-in calculation such as \(\exp[-tE(\lambda\mid\text{data})]\) is a survival value at the posterior mean hazard, not the posterior mean survival. For a nondegenerate posterior these generally differ; the mean survival is the Gamma Laplace transform derived above. Reporting only a plug-in value also hides posterior uncertainty, which a credible interval or a posterior probability of exceeding a target makes visible.
A frequentist Kaplan–Meier estimate is a standard alternative for summarizing observed survival without imposing a constant hazard. It is not the same as a Bayesian posterior distribution: the transformed Gamma posterior uses a specified prior and the exponential model, while a Kaplan–Meier estimate does not provide this model-based posterior uncertainty. The choice depends on the scientific aim and assumptions. Neither method removes the need to assess whether the observed follow-up and censoring support the intended interpretation.
Check Your Understanding
Try each question, then compare your reasoning with the short solutions.
- With prior \(\operatorname{Gamma}(2,3)\), \(D=2\), and \(T=7\), what is the hazard posterior?
- Explain why the lower endpoint of a central 95% survival interval uses the 97.5th hazard percentile.
- If \(\lambda\mid\text{data}\sim\operatorname{Gamma}(1,8)\), find the CDF and mean of \(S(4)\).
- If the central 95% posterior interval for \(\lambda\) is \([0.04,0.30]\) per year, find the corresponding survival interval at 6 years.
- Name two assumptions that support using the right-censored exponential posterior update.
Solutions. (1) The posterior is \(\operatorname{Gamma}(2+2,3+7)=\operatorname{Gamma}(4,10)\). (2) Since \(S(t)=\exp(-t\lambda)\) decreases with \(\lambda\), a large hazard gives a small survival value; therefore the lower survival endpoint is \(\exp(-tq_{0.975})\). (3) For \(0<s<1\), \(F_{S(4)}(s)=\exp[-8(-\log(s)/4)]=s^2\); the distribution has density \(2s\) and mean \(2/3\). (4) Reverse the hazard endpoints: \([\exp(-6(0.30)),\exp(-6(0.04))]=[0.165,\ 0.787]\). (5) The model assumes a constant exponential hazard and censoring noninformative for the event-time likelihood; it also assumes independent event times across participants for the stated likelihood.