Tutorials › Exam ASTAM - Advanced Short-Term Actuarial Mathematics › Worked Example: Reconstructing Risk Sets

Exam ASTAM · Empirical Loss and Survival · Tutorial 226 of 979

Worked Example: Reconstructing Risk Sets

Practice reconstructing who remains at risk immediately before each distinct event time and counting the events at that time.

Beginner 10 min read

What You'll Learn

  • Define risk-set membership from observed times and event indicators
  • Sort records and identify distinct event times
  • Count the records at risk and events at each event time
  • Handle tied events and censoring times consistently
  • Check risk-set counts by tracking records that have already ended
  • Avoid including observations whose recorded times precede an event

Why Reconstruct Risk Sets?

When records include right-censored observations, a list of times alone does not tell us which observations represent events. A risk set answers a different question: which records are still under observation immediately before a particular time? Reconstructing that set carefully is an essential bookkeeping step in empirical survival summaries.

The task in this tutorial is limited to sorting records, identifying distinct event times, and finding the risk-set size and event count at each one. No interest rate, mortality law, or parametric distribution is assumed; all calculations use only the observed times and event indicators.

Definition: For record \(i\), let \(Z_i\) be its observed time and let \(\delta_i=1\) indicate an event, while \(\delta_i=0\) indicates right censoring. At time \(t\), the risk set is \(R(t)=\{i:Z_i\ge t\}\), and its size is \(Y(t)=|R(t)|\). The event count at \(t\) is \(d(t)=\sum_i I(Z_i=t,\delta_i=1)\), where \(I(\cdot)\) equals 1 when the stated condition holds and 0 otherwise.

The inequality \(Z_i\ge t\) is important. A record ending at exactly \(t\), whether by event or censoring, is in the risk set immediately before \(t\). A record with \(Z_i<t\) has already ended and is not in that set. To find the event times, take the distinct observed times for which at least one record has \(\delta_i=1\); a time with only censored records is not an event time.

A Reliable Reconstruction Method

Begin by sorting all records by observed time, not just the event records. Then inspect the complete sorted list to identify event times. At each such time, count every record whose observed time is at least that time, and count as events only records at that exact time with indicator 1.

1
Sort every record.
Keep each time paired with its event indicator and, if useful, its record label. Do not discard censoring records.
2
List distinct event times.
Include a time if one or more records at that time have indicator 1. A tied event time appears only once in this list.
3
Count membership and events separately.
For each event time \(t\), count records with \(Z_i\ge t\) to get \(Y(t)\), then count records with \(Z_i=t\) and \(\delta_i=1\) to get \(d(t)\).
4
Check who has already ended.
Subtract every record with an observed time strictly less than the event time. This catches the common error of carrying an earlier censoring or event record into a later risk set.
Why the risk-set count works: Each record contributes one to \(Y(t)\) exactly when its observed time is at least \(t\). Thus \(Y(t)=\sum_i I(Z_i\ge t)\). If \(t<t'\), then \(Y(t)-Y(t')\) is the number of records with \(t\le Z_i<t'\): these are precisely the records counted at \(t\) that have ended before \(t'\). The event count is narrower: it includes only event records at the exact time, not censorings or events at other times.

Worked Reconstructions

Worked Example: Events Tied with Censoring

A hypothetical warranty study follows eight units. Their observed times and indicators are: A, time 1, censored; B, time 2, event; C, time 2, censored; D, time 4, event; E, time 4, event; F, time 5, censored; G, time 7, event; H, time 7, censored. Find the risk-set size and event count at every event time. This is a reconstruction from observed data; no interest, mortality assumption, or parametric distribution is used.

Method: sort, identify the event times, and count records with \(Z_i\ge t\). The distinct event times are 2, 4, and 7. Time 1 and time 5 are censoring times only, so neither is an event time.

At time 2, A has already ended at time 1. The records still at risk are B, C, D, E, F, G, and H, so \(Y(2)=7\). Only B is an event at time 2; C is censored at that time. Therefore \(d(2)=1\).

At time 4, A, B, and C have all ended before time 4. The risk set is D, E, F, G, and H, so \(Y(4)=5\). D and E are events at time 4, giving \(d(4)=2\).

At time 7, A through F have all ended before time 7. The risk set is G and H, so \(Y(7)=2\). G is an event and H is censored at time 7, giving \(d(7)=1\).

Event time \(t\)Records in \(R(t)\)Risk-set size \(Y(t)\)Event count \(d(t)\)
2B, C, D, E, F, G, H71
4D, E, F, G, H52
7G, H21

Check. The risk-set sizes decrease from 7 to 5 to 2 as records end. The records censored at times 2 and 7 are included in their respective risk sets, but not in the event counts. The method avoids the mistake of treating a tied censoring as an event.

Worked Example: Reconstructing Risk Sets from a Full Sorted List

A hypothetical equipment study records ten units: A, time 1.5, event; B, time 2, censored; C, time 3, event; D, time 3, censored; E, time 3, event; F, time 4, event; G, time 4, censored; H, time 6, censored; I, time 6, event; J, time 8, event. Find the risk-set sizes and event counts. As in the preceding example, no interest, mortality assumption, or parametric distribution is part of this calculation.

The records are already listed in time order. The event times are 1.5, 3, 4, 6, and 8. The time-2 observation is censored, but it still affects which records remain at risk later.

At time 1.5, all ten records have observed times at least 1.5. Thus \(Y(1.5)=10\), and A is the only event, so \(d(1.5)=1\).

At time 3, A and B ended earlier: A had an event at 1.5, and B was censored at 2. The risk set is C, D, E, F, G, H, I, and J. Hence \(Y(3)=8\). C and E are events at time 3, while D is censored there, so \(d(3)=2\).

At time 4, the records with observed times at least 4 are F, G, H, I, and J. Therefore \(Y(4)=5\). F is the only event at time 4, giving \(d(4)=1\).

At time 6, only H, I, and J have observed times at least 6, so \(Y(6)=3\). H is censored and I is an event at time 6; therefore \(d(6)=1\). At time 8, only J remains in the risk set, giving \(Y(8)=1\) and \(d(8)=1\).

Event time \(t\)Records in \(R(t)\)\(Y(t)\)\(d(t)\)
1.5A, B, C, D, E, F, G, H, I, J101
3C, D, E, F, G, H, I, J82
4F, G, H, I, J51
6H, I, J31
8J11

Check. The risk set at time 3 excludes both records that ended before 3, not just the earlier event. At times 3, 4, and 6, tied censorings are included in the risk-set membership but excluded from \(d(t)\). This separates the two counts correctly.

Worked Example: Tracking Intermediate Censoring Times

A hypothetical portfolio follows eleven policies. A, time 0.5, is censored; B, time 1, has an event; C, time 1, is censored; D, time 2, is censored; E, time 2.5, has an event; F, time 2.5, has an event; G, time 3, is censored; H, time 4, has an event; I, time 4, is censored; J, time 6, has an event; K, time 7, is censored. Determine \(Y(t)\) and \(d(t)\) at every event time. These are observed-time counts only, with no interest, mortality assumption, or parametric distribution.

The event times are 1, 2.5, 4, and 6. The censoring at time 0.5 occurs before the first event time; the censorings at 1, 2, 3, 4, and 7 are retained in the sorted records, even though they do not create event times themselves.

At time 1, A has ended at 0.5, leaving ten records in the risk set. B is the only event at time 1, so \(Y(1)=10\) and \(d(1)=1\).

At time 2.5, B ended at 1 and C ended at 1; D was censored at 2. These three records are excluded. The remaining records are E, F, G, H, I, J, and K, so \(Y(2.5)=7\). E and F are both events at 2.5, hence \(d(2.5)=2\).

At time 4, E and F have ended at 2.5 and G was censored at 3. The risk set is H, I, J, and K, giving \(Y(4)=4\). H is an event at 4, while I is censored at 4, so \(d(4)=1\).

At time 6, H and I have both ended at 4. Only J and K remain, so \(Y(6)=2\), and J is the sole event at 6: \(d(6)=1\).

Event time \(t\)Records in \(R(t)\)Risk-set size \(Y(t)\)Event count \(d(t)\)
1B, C, D, E, F, G, H, I, J, K101
2.5E, F, G, H, I, J, K72
4H, I, J, K41
6J, K21

Check. From time 1 to time 2.5, B and C have ended at 1 and D at 2, so the risk set falls from 10 to 7. From 2.5 to 4, E and F end at 2.5 and G at 3, so it falls from 7 to 4. The intermediate censoring times matter even though they are not event times.

Common Mistake: Counting Records That Ended Earlier

A tempting shortcut is to begin with the total number of records and subtract only earlier events. That is incorrect: an earlier censored record has also left observation and cannot be in a later risk set. For example, in the first worked example, counting all eight records at time 2 is wrong because A ended at time 1. The correct calculation is \(8-1=7\). At time 4, three records—A, B, and C—ended before 4, so the correct risk-set size is \(8-3=5\), not 6.

A second error is to count everyone at the event time as an event. At time 4 in that example, D, E, and no others have records ending exactly then; both D and E are events, so \(d(4)=2\). At time 7, G is an event and H is censored: both belong to the risk set, but only G contributes to the event count. The general check is to calculate \(Y(t)\) from all records with \(Z_i\ge t\), then calculate \(d(t)\) only from records with \(Z_i=t\) and \(\delta_i=1\).

Key takeaway: At an event time \(t\), include all records ending at \(t\) and all records ending later in \(Y(t)\); exclude every record ending before \(t\). Then count only exact-time event records in \(d(t)\). Keeping those two operations separate is the central safeguard in risk-set reconstruction, aligned with the SOA Exam ASTAM (Advanced Short-Term Actuarial Mathematics) syllabus.

Check Your Understanding

For each problem, identify the distinct event times and reconstruct the risk-set size and event count at each one. Treat each record ending exactly at an event time as in the risk set, whether it is an event or a censoring.

  1. A study has six records: A, time 1, censored; B, time 2, event; C, time 2, event; D, time 3, censored; E, time 4, event; F, time 4, censored. State the risk-set size and event count at every event time. (Answer: time 2: \(Y=5,d=2\); time 4: \(Y=2,d=1\).)
  2. Seven records have times and indicators: A, 1, event; B, 2, censored; C, 3, event; D, 3, censored; E, 5, event; F, 5, censored; G, 6, event. Give the event-time risk-set sizes and event counts. (Answer: time 1: \(Y=7,d=1\); time 3: \(Y=5,d=1\); time 5: \(Y=3,d=1\); time 6: \(Y=1,d=1\).)
  3. Eight records are: A, 1, censored; B, 2, event; C, 2, censored; D, 3, event; E, 4, censored; F, 4, event; G, 6, event; H, 7, censored. Find the risk-set size and event count at each event time. (Answer: time 2: \(Y=7,d=1\); time 3: \(Y=5,d=1\); time 4: \(Y=4,d=1\); time 6: \(Y=2,d=1\).)
  4. Nine records end as follows: A, 0, censored; B, 1, event; C, 2, censored; D, 2, censored; E, 3, event; F, 4, censored; G, 5, event; H, 5, censored; I, 8, event. Find \(Y(t)\) and \(d(t)\) at every event time. (Answer: time 1: \(Y=8,d=1\); time 3: \(Y=5,d=1\); time 5: \(Y=3,d=1\); time 8: \(Y=1,d=1\).)
  5. Nine records are: A, 1, event; B, 2, event; C, 2, censored; D, 3, event; E, 3, censored; F, 4, censored; G, 5, event; H, 5, censored; I, 6, event. Determine the risk-set size and event count at each event time. (Answer: time 1: \(Y=9,d=1\); time 2: \(Y=8,d=1\); time 3: \(Y=6,d=1\); time 5: \(Y=3,d=1\); time 6: \(Y=1,d=1\).)
Clinical Biostats