Why Event Counts and Follow-Up Determine the Update
With right-censored trial data, participants can contribute different amounts of observation time. A participant who experiences the event contributes time up to the event; one who is censored contributes time up to censoring. Under a constant exponential hazard, the likelihood for the hazard depends on the data through two summaries: the number of observed events and the total time at risk. A Gamma prior combines with this likelihood to produce a Gamma posterior.
The update is simple, but its interpretation depends on using a consistent definition of exposure and consistent time units. It also depends on a substantive model: the event hazard is assumed constant over time and common to the participants represented by the model. The formula is not a substitute for checking whether those assumptions are plausible.
Model, Likelihood, and Posterior Update
Assume each participant has an event time with an exponential distribution having the same hazard \(\lambda\). Equivalently, while a participant is event-free and under observation, the instantaneous event rate is constant over time. Let \(T_i\) be the event time and \(C_i\) the censoring time for participant \(i\). The observed time is \(Y_i=\min(T_i,C_i)\), and the event indicator is \(\delta_i=1\) if the event is observed and \(0\) if the participant is censored. Then \(D=\sum_i\delta_i\) and \(E=\sum_iY_i\).
The likelihood contribution from an observed event at time \(Y_i\) is proportional to \(\lambda e^{-\lambda Y_i}\); the contribution from a right-censored observation at time \(Y_i\) is \(e^{-\lambda Y_i}\). This likelihood treats the censoring mechanism as non-informative for \(\lambda\): censoring does not convey additional information about the participant's event time after conditioning on the model and observed data. The observed times must be correctly recorded, and the common constant-hazard model must be appropriate for the endpoint and population being analyzed.
The likelihood expression is also the event-count and total-exposure form of the exponential model. It shows why the specific ordering of event and censoring times does not enter the update beyond \(D\) and \(E\), under the stated model. Multiply this likelihood by the Gamma prior density. The terms depending on \(\lambda\) are \(\lambda^{a+D-1}e^{-(b+E)\lambda}\), which are the kernel of another Gamma density.
Count observed events, \(D\), and add all observed at-risk times, \(E\), using one consistent time unit.
Write \(\lambda\sim\operatorname{Gamma}(a,b)\) in the shape-rate convention, with \(b\) expressed in the time units matching the hazard.
The posterior shape is \(a+D\), and the posterior rate is \(b+E\).
Use the resulting Gamma distribution for posterior summaries of the hazard, retaining its time unit.
Why the Update Is Gamma
Bayes' rule says that the posterior density is proportional to the prior density multiplied by the likelihood. With the stated prior and likelihood,
A Gamma density with shape \(a+D\) and rate \(b+E\) has exactly this kernel. Because \(a+D>0\) and \(b+E>0\), it is a proper distribution and can be normalized by its Gamma density constant. This establishes the update; it is not an approximation. The count of events increases the shape, while accumulated person-time increases the rate.
Worked Example: Six Events Over Eighteen Person-Years
Suppose a hypothetical trial dataset contains \(D=6\) observed events and \(E=18\) person-years of follow-up. For illustration, take a prior \(\lambda\sim\operatorname{Gamma}(2,10)\), where the rate parameter is \(10\) person-years.
The likelihood kernel is \(\lambda^6e^{-18\lambda}\). Multiplying by the prior kernel \(\lambda^{2-1}e^{-10\lambda}\) gives $$ \lambda^{6+2-1}e^{-(18+10)\lambda} =\lambda^7e^{-28\lambda}. $$ Therefore the posterior is \(\operatorname{Gamma}(8,28)\), with its rate measured in person-years.
The prior mean hazard is \(2/10=0.2000\) events per person-year. The posterior mean is $$ \frac{a+D}{b+E}=\frac{2+6}{10+18}=\frac{8}{28}=0.2857 $$ events per person-year. This is a posterior mean hazard under the model, not a claim that every participant experiences events at that observed average rate.
As a check on the likelihood calculation, the maximum likelihood estimate is \(D/E=6/18=0.3333\) events per person-year in this example, since \(D>0\) and \(E>0\). The posterior mean is lower because the specified prior contributes information as well as the data.
Zero Events and the Role of Exposure
The update remains defined when \(D=0\). The likelihood then reduces to \(e^{-\lambda E}\): zero observed events still contributes information when \(E>0\), because longer event-free observation is less compatible with a high hazard. The posterior shape remains \(a\), while the rate increases from \(b\) to \(b+E\). Thus the posterior mean decreases from \(a/b\) to \(a/(b+E)\).
Worked Example: Updating After Zero Events
Imagine a hypothetical study with no observed events during \(E=24\) person-months of follow-up. Suppose the prior for the monthly hazard is \(\operatorname{Gamma}(1.5,12)\), where the prior rate parameter is 12 person-months.
Here \(D=0\). Applying the update gives $$ \lambda\mid\text{data}\sim\operatorname{Gamma}(1.5+0,12+24) =\operatorname{Gamma}(1.5,36). $$
The prior mean is \(1.5/12=0.1250\) events per person-month. The posterior mean is \(1.5/36=0.04167\) events per person-month. The posterior still has uncertainty: observing zero events does not establish that the hazard is zero. Rather, the event-free exposure shifts the distribution toward smaller hazard values.
For \(E>0\), the likelihood \(e^{-\lambda E}\) strictly decreases over \(\lambda>0\). Consequently, when the parameter space is restricted to \(\lambda>0\), the likelihood has no attained maximum if \(D=0\); its supremum is approached as \(\lambda\) approaches zero. If the parameter space is extended to include \(\lambda=0\), zero is the boundary maximum. This distinction does not prevent the proper Gamma posterior update.
Units Must Match
A hazard is a rate per time unit, while the Gamma rate parameter \(b\) has time units. If the hazard is expressed per year, both \(b\) and exposure \(E\) must be expressed in years. One cannot add a prior rate parameter in person-years to follow-up measured in person-days. Convert one of them first.
If time is rescaled, the numerical value of the hazard changes inversely. For example, a hazard in events per day is multiplied by 365.25 to express it in events per year. The Gamma shape remains unchanged under this rescaling, but the Gamma rate parameter must be converted consistently. This is a unit transformation, not a new prior belief.
Worked Example: Converting Person-Days to Person-Years
Suppose a hypothetical dataset has \(D=3\) events and \(E=5{,}400\) person-days. Use \(365.25\) days per year and a prior \(\operatorname{Gamma}(1,20)\) for a hazard measured per year; thus the prior rate parameter is 20 person-years.
Convert exposure before adding it to the prior rate: $$ E=\frac{5{,}400}{365.25}=14.7844\text{ person-years}. $$ The posterior is therefore $$ \operatorname{Gamma}(1+3,20+14.7844) =\operatorname{Gamma}(4,34.7844), $$ with the posterior hazard measured in events per person-year.
Its posterior mean is \(4/34.7844=0.1150\) events per person-year. For a direct check in days, the prior rate parameter would be \(20(365.25)=7{,}305\) person-days. The posterior in day units is \(\operatorname{Gamma}(4,7{,}305+5{,}400)=\operatorname{Gamma}(4,12{,}705)\), whose mean is \(4/12{,}705=0.0003148\) events per person-day. Multiplying by 365.25 gives approximately \(0.1150\) events per person-year, agreeing up to rounding.
Diagnostics, Alternatives, and Limitations
Before applying the update, verify that each participant's contribution to \(E\) is time at risk and ends at the event or censoring time, and that \(D\) counts the observed events covered by the model. Confirm that all exposure and prior parameters use the same time scale. A negative or zero total exposure with observed events, or a mismatch between the event count and recorded follow-up, signals a data-definition problem rather than an unusual posterior.
The constant-hazard assumption is also substantive. If the event rate changes over follow-up, a single exponential hazard may give a misleading summary. Differences in hazard across participants or treatment groups likewise do not become harmless merely because the arithmetic update is available. The method represents the stipulated common hazard; it does not diagnose or repair violations of that model. Informative censoring, in which censoring conveys information about event risk not represented in the model, also undermines the stated likelihood.
A Gamma prior is convenient because it is conjugate: the posterior has the same distributional family and a closed-form update. Other priors can be used, but their posterior distributions generally require different calculations. The exponential event-time likelihood with right censoring is the likelihood foundation here; the Gamma prior adds a particular, explicit prior model for the hazard. This update produces a posterior distribution for the hazard itself. It does not by itself answer a question about survival at a specified time or compare hazards between trial arms.
A common mistake is to say, “There were no events, so the estimated hazard and posterior hazard are zero.” The correction is that \(D/E=0\) is not an attained maximum likelihood estimate when \(\lambda>0\) and \(D=0\), and the Gamma posterior remains a distribution over positive hazards. Event-free exposure shifts that distribution downward, but does not put all posterior probability at zero.
For comparison, the maximum likelihood estimate is \(D/E\) when \(D>0\) and \(E>0\). If the model's parameter space is restricted to \(\lambda>0\) and \(D=0\), there is no attained maximum; the likelihood supremum is at the excluded boundary zero. If one instead extends the parameter space to include \(\lambda=0\), then \(D/E\) is a maximum likelihood estimate for \(D\geq0\), with zero the boundary estimate when \(D=0\). Bayesian inference differs by combining likelihood and prior and yielding a posterior distribution, including in the zero-event case.
Check Your Understanding
Answer each question, then compare with the brief solutions below.
- A study observes \(D=4\) events and \(E=16\) person-years. Under a \(\operatorname{Gamma}(2,8)\) prior, what is the posterior distribution and its mean?
- With \(D=0\), \(E=10\) person-years, and prior \(\operatorname{Gamma}(3,15)\), does the posterior put all its mass at zero? Give the posterior.
- A hazard is modeled per year, the prior rate parameter is in person-years, and the exposure is recorded in person-days. What must be done before applying the update?
- For \(D=0\), \(E>0\), and parameter space \(\lambda>0\), is zero an attained maximum likelihood estimate?
Solutions. (1) The posterior is \(\operatorname{Gamma}(2+4,8+16)=\operatorname{Gamma}(6,24)\); its mean is \(6/24=0.2500\) events per person-year. (2) No. The posterior is \(\operatorname{Gamma}(3,25)\), with positive support and mean \(3/25=0.1200\) events per person-year. (3) Convert exposure to person-years, or convert the prior rate parameter and hazard representation to day units, before adding the rate and exposure quantities. (4) No. The likelihood strictly decreases for positive \(\lambda\), so its supremum is approached at zero but is not attained in the restricted parameter space.