A cohort starts when units become eligible, not when their outcomes become convenient to observe.
Cohort entry and survivorship bias: count the cases that could fail
Choose a common starting event
A support dashboard claims that 94% of cases resolve within two days. Its query starts from cases marked resolved, so open cases never enter the denominator. The issue is selection: the dashboard conditions on reaching the favorable outcome. Start instead with every eligible case submitted during a fixed intake window. Record case ID, submission time, channel and any exclusions known at entry. A cohort denominator must be chosen before resolution status is inspected.
Align follow-up time
Cases submitted on the last day have less opportunity to resolve than cases submitted on the first. Freeze an analysis cutoff and compute follow-up from each submission to resolution or cutoff. For a strict two-day outcome, include only cases that had a full two-day observation window, or use a method designed for incomplete follow-up. Dropping open cases is never equivalent. If cases may re-open, define whether the first resolution, final resolution or durable resolution is the event.
Trace attrition
Build a cohort ledger: 237 intake IDs, 11 excluded by a predeclared spam rule, 226 eligible, 178 resolved by cutoff and 48 still open. Among those eligible, 151 resolved within two days. The naive completed-case figure is 151/178, about 84.8%; the observed two-day fraction over all eligible cases is 151/226, about 66.8%, but it is only a final two-day outcome for cases with enough follow-up. Show a follow-up-eligible denominator separately. Censoring handles the remaining observation problem.
Test whether groups enter differently
Compare channel, priority and submission week for eligible, excluded, resolved and open cases. A self-service route may close easy requests without agent assignment; an export of agent cases omits it. That is a frame error layered on top of survivorship. Keep the exclusion ledger and the intake snapshot so an analyst can reconstruct every denominator. Frame coverage sets the outer boundary of the claim.
State the claim at its proper scope
The completed-case figure describes completed cases only. A cohort resolution measure describes intake cases subject to a declared follow-up rule. Neither number establishes that a new workflow caused improvement: case mix, staffing and seasonality can change together. Publish counts beside rates, and refuse a single headline when the denominator is still moving.
Implementation
def cohort_state(cases, analysis_cutoff):
summary = {"eligible": 0, "resolved": 0, "open": 0}
for case in cases:
if case["submitted_at"] > analysis_cutoff or case["spam_at_entry"]:
continue
summary["eligible"] += 1
resolved_at = case["resolved_at"]
if resolved_at is not None and resolved_at <= analysis_cutoff:
summary["resolved"] += 1
else:
summary["open"] += 1
assert summary["eligible"] == summary["resolved"] + summary["open"]
return summaryPerformance and operating cost
One pass over N intake cases costs O(N) time and O(1) auxiliary space. A production cohort ledger stores one state and an exclusion reason per case, requiring O(N) space; timestamp normalization and duplicate identity resolution happen before this pass.
Common Mistakes
- Do not use resolved cases as the denominator for an intake-cohort resolution claim.
- Do not grant late entrants the same follow-up time as early entrants.
- Do not infer a workflow effect from a before-and-after cohort without checking composition and concurrent changes.
Read next
- Right censoring and time-to-event analysis for open cases
- Metric denominators and cohorts: make a rate reproducible
- Sampling frames and coverage error: who could enter the analysis?
- Project: audit support resolution with open cases and imperfect labels
Continue the workflow: Ordered funnels: step order, entry rules and conversion windows.
Continue the workflow: Kaplan–Meier curves for support resolution.
Continue the workflow: Landmark analysis and immortal-time traps.
