TL;DR
Some measurements are incomplete. A patient may still be event-free when a study closes, or a component may still be working when its test ends. We do not know the exact time, only that it is at least some value. This is censoring. Two common shortcuts both bias the results: dropping those cases, or treating them as if the event happened at the cutoff. The correct approach writes a likelihood that uses each partial observation for exactly what it tells us.
Where you'll see it: in reliability tests that stop before every part fails, in churn models for customers who have not left yet, and as the input to the Kaplan–Meier estimator.
Intuition
Knowing only a bound
Imagine following ten light bulbs for 100 hours. Seven burn out during the study, and we record their exact failure times. The other three are still burning when the study ends. For those three we know the lifetime is more than 100 hours, but not by how much. Their lifetime has been cut off, or censored, at 100 hours.
This particular kind is called right censoring, because the unknown value lies to the right of what we recorded. The same idea appears in other forms. Left censoring means we know a value is below a detection limit. Interval censoring means we know only that a failure happened between two inspections. This lesson focuses on right censoring, the most common case.
Why the easy fixes fail
Two shortcuts come to mind first.
- Drop the censored bulbs. You keep only the seven that failed. Those are the short-lived ones, so the average lifetime looks shorter than it really is.
- Treat the censored times as failure times. The three surviving bulbs get recorded as failing at 100 hours. Their true failure times are later, so again the lifetimes look too short.
Both shortcuts bias the estimate in the same direction. The information "these three lasted at least 100 hours" is real evidence, and the goal is to use it.
flowchart LR
S[Unit starts observation] --> Q{Does the event happen before observation stops?}
Q -->|yes| E[Event observed at time t]
Q -->|no| C[Censored at time c: lifetime is at least c]
The math
Observed time and status
Each unit has a true lifetime and a censoring time , the moment we stop watching it or it leaves the study. We never see directly when it lies beyond . What we record is
is the observed time. The status is 1 if the event was seen and 0 if the unit was censored. Here is the indicator function, equal to 1 when the statement inside holds and 0 otherwise. The pairs are the whole dataset.
A unit is right-censored when we know only that its lifetime exceeds its censoring time, . The data for that unit are and . A unit whose event was observed has and .
Building the likelihood
Maximum likelihood chooses the parameter that makes the observed data most probable. So for each unit we need the probability of what we actually saw.
- If the event was observed at time , the contribution is the density of the lifetime at .
- If the unit was censored at time , we know only that . The probability of that is the survival function, .
Assuming units are independent, the likelihood is the product of these contributions:
Taking logarithms turns the products into sums, which is easier to differentiate:
This single formula is the thing to remember. Each unit contributes through its density if it failed, and through its survival probability if it did not.
Why a censored unit uses , not
A censored unit's exact failure time is unknown, so its density at the cutoff is the wrong quantity. Using would claim the failure happened exactly at , which we know is false. The correct statement is about a tail: the failure happened somewhere after . The probability of a tail is . This is the one place where the likelihood uses the survival function rather than the density.
The exponential case
Suppose lifetimes are exponential with rate , so and . Let be the number of observed events, and let be the total observed time across all units. For an event, and the contribution is . For a censored unit, and the contribution is . Adding these together gives
Setting the derivative to zero:
The estimate is the number of events divided by the total exposure time. Censored units add their time to the denominator but not to the numerator. That single asymmetry is the whole trick.
- density f(t)
- survival S(t)
Worked examples
Five units are watched. Here are their observed times and statuses.
| unit | (hours) | what happened | |
|---|---|---|---|
| A | 2 | 1 | failed at 2 |
| B | 3 | 1 | failed at 3 |
| C | 4 | 0 | still running at 4 (censored) |
| D | 6 | 1 | failed at 6 |
| E | 7 | 0 | still running at 7 (censored) |
- Count the events: (units A, B and D).
- Total observed time: hours.
- Apply the formula: per hour.
- Interpret: under the exponential model, the mean lifetime is hours.
Now compare the two shortcuts on the same data.
- Drop the censored units C and E. Only A, B and D remain, with total time . The estimate is , about twice the correct value.
- Treat the censored times as failures. All five count as events, so . Still too high.
Both shortcuts claim that failures come faster than the data support. Units C and E say only that they lasted at least 4 and 7 hours, and the likelihood uses exactly that.
Take per hour. Unit X fails at . Unit Y is censored at .
- Unit X contributes its density: .
- Unit Y contributes its survival probability: .
- The joint likelihood is .
- The log-likelihood is .
Interpretation: a value of that is too large makes the observed failure at 2 likely but makes the survival of unit Y past 4 unlikely, and the product balances the two. Maximising over finds the value that balances them best.
Tradeoffs and failure modes
The likelihood above assumes non-informative censoring: the reason a unit leaves observation tells you nothing about how long it would have lasted. A bulb removed from a test for an unrelated reason satisfies this. A patient who drops out of a trial because they feel worse does not, and the estimates will be biased in a way more data will not fix.
| Situation | What goes wrong | Better choice |
|---|---|---|
| Censored units are dropped | Lifetimes look shorter than they are | Use the likelihood with censoring terms |
| Censored times are treated as failures | Lifetimes look shorter, in the same way | Same fix |
| Censoring depends on the outcome, such as dropouts who are getting worse | Bias that does not shrink with more data | Record the reason for censoring, and model it |
| Exponential assumed when the failure rate changes over time | The likelihood is maximised but the shape is wrong | Check the fit, or use a nonparametric estimator |
| Heavy censoring with very few events | Estimates are unstable and intervals are wide | Report the uncertainty and avoid extrapolating past the last observed time |
History
Actuaries and demographers worked with incomplete lives long before modern statistics. Edmond Halley's life table of 1693 is a well-known early example of turning mortality records into survival estimates. The modern treatment of incomplete data came in the late 1950s. Edward Kaplan and Paul Meier published a nonparametric way to estimate a survival curve when some observations are censored, in a 1958 paper in the Journal of the American Statistical Association. Their product-limit method became the standard in clinical and reliability studies. In 1972 David Cox introduced the proportional hazards model, which lets censored data be combined with covariates such as age or dose in a single regression-style likelihood.
Check yourself
QuestionRecall: in the likelihood, what does a status of tell you about unit ?Show answer
It means the unit was censored. Its event had not been seen by time , so all we know is that its lifetime is greater than . Its contribution to the likelihood is the survival probability , not the density.
QuestionComputation: four units are watched. Their observed times are 1 (failed), 5 (censored), 2 (failed) and 8 (failed). Under the exponential model, what is the MLE of the rate ?Show answer
There are events. The total observed time is . So per time unit. The censored unit contributes its 5 units of time to the denominator and nothing to the numerator.
QuestionWhy: why is it wrong to write the likelihood of a censored unit as its density evaluated at the censoring time?Show answer
The density is the probability density that the failure happens at exactly . For a censored unit we know that the failure is not observed by , so the event lies somewhere after . The probability of a tail beyond is . Using would assume a failure at exactly , which is a claim the data do not support.
QuestionApplied: a churn analysis exports customer records on a fixed date. Some customers have not cancelled by then. What enters the likelihood for those customers, and what happens if you delete them from the data?Show answer
Each customer who has not cancelled by the export date is right-censored at their tenure so far. They enter the likelihood through their survival probability . Deleting them keeps only customers who have already left, so the estimated time until churn comes out too short. The fix is to keep them with their censored tenure, and to check whether the reason for censoring (the export date) is unrelated to whether they churn.