An interval-censored event is known to have occurred between two inspections, while its exact time is unknown; neither endpoint is an observed event time.
Interval-censored support resolution times
Preserve the observation interval
A batch system checks case status every few days. A case unresolved at day two but resolved when next checked at day five has a resolution time in (2,5]. Labelling it as a day-five resolution creates an artificial delay; labelling it as day two creates an artificial improvement. Store the last confirmed unresolved age and first confirmed resolved age. An open case last checked at day seven is right-censored beyond seven. Right censoring and interval censoring carry different information.
Handle interval boundaries consistently
The teaching ledger has several (left,right] resolution intervals and one right-censored case (7,infinity). A case resolved at the first inspection may be left-censored within (0,first inspection]. If an event timestamp is exact, keep it as exact rather than broadening it to an arbitrary daily window. Reject a negative age, a zero-width interval in this simplified model, or a right endpoint earlier than its left. A system that changed inspection cadence can change interval widths without changing the underlying resolution process.
Use a likelihood that respects what was seen
For an illustrative exponential resolution model with rate lambda, the probability of resolution in (L,R] is exp(-lambda L) minus exp(-lambda R). The probability of still being unresolved beyond L is exp(-lambda L). Summing the log of the appropriate contribution for each case yields a likelihood that uses interval information without inventing exact event times. The grid search below is deliberately small and parametric; it is not a general nonparametric interval-censored survival estimator.
Separate model fit from business interpretation
A constant hazard assumption can be implausible when new cases are easy and old cases become increasingly difficult. Inspect whether predicted inspection-state shares match observed ones by interval and queue. A fitted rate is conditional on the inspection schedule and inclusion rule; it should not be compared with a Kaplan–Meier curve built from invented exact times. If the goal is a six-day service claim, report an interval-aware estimate and uncertainty under a method that supports the observation pattern.
Build a verification route
For production, use an implementation designed for interval censoring and verify its supported interval conventions. Keep raw inspections so the bounds can be rebuilt after a status correction. Avoid replacing infinity with a giant made-up timestamp in an export. The review project blocks model release when interval cases are silently forced into the exact-time path.
Implementation
from math import expm1, log
def interval_resolution_log_likelihood(observations, resolution_rate):
if resolution_rate <= 0:
raise ValueError("rate must be positive")
total = 0.0
for last_unresolved_day, first_resolved_day in observations:
if last_unresolved_day < 0:
raise ValueError("negative observation age")
if first_resolved_day is None:
total -= resolution_rate * last_unresolved_day
continue
if first_resolved_day <= last_unresolved_day:
raise ValueError("invalid resolution interval")
interval_width = first_resolved_day - last_unresolved_day
total += -resolution_rate * last_unresolved_day
total += log(-expm1(-resolution_rate * interval_width))
return total
inspections = [(0, 2), (2, 5), (4, 7), (7, None), (0, 3)]
candidate_rates = [step / 1000 for step in range(20, 501, 2)]
best_rate = max(candidate_rates, key=lambda rate:
interval_resolution_log_likelihood(inspections, rate))
assert 0.02 <= best_rate <= 0.5
assert interval_resolution_log_likelihood(inspections, best_rate) >= (
interval_resolution_log_likelihood(inspections, 0.1))Performance and operating cost
With N observations and G candidate rates, the explicit grid is O(N × G) time and O(N) input space. A general interval-censored fit needs more careful optimization and uncertainty calculation. The dominant data risk is losing inspection bounds during extraction.
Common Mistakes
- Do not substitute the right inspection time as the exact resolution time.
- Do not call a right-censored case an interval-censored resolution.
- Do not present a constant-rate grid search as a model-free survival curve.
