Introduction to Survival Analysis

From Time Series to Time-to-Event Data

Bakti Siregar, M.Sc., CDS.

Data Science ~ ITSB

2026-02-19

Why Do We Analyze Time?

Many real-world problems involve time:

  • Monthly sales
  • Machine lifetime
  • Customer retention
  • Time to graduation

Question:
Do all time-related data use the same analysis method?

Two Fundamental Time Questions

  1. How does a value change over time?
  2. How long does it take until an event occurs?

➡ Different questions → different statistical methods

Time Series Analysis or Time to Event?

Time Series Analysis

What Is Time Series Analysis?

Time Series Analysis focuses on:

  • Observations recorded at regular time intervals
  • The value of a variable at each time point

Examples:

  • Monthly revenue
  • Daily temperature
  • Stock prices

Characteristics of Time Series Data

  • Each time point has a value
  • No concept of event
  • No censoring

Typical outputs:

  • Trend
  • Seasonality
  • Forecasting

Example of Time Series Data

Month Sales
Jan 120
Feb 135
Mar 128

Focus: values, not events

Limitations of Time Series

Time Series is not appropriate when:

  • The interest is waiting time
  • Not all subjects experience the event
  • Observation ends before the event occurs

Time-to-Event Data

Shift in Perspective

New question:

“How long does it take until an event happens?”

➡ This leads to Time-to-Event (TTE) analysis

What Is Time-to-Event Data?

Time-to-Event data measure:

The duration from a defined start time
until a specific event occurs

Examples:

  • Enrollment → graduation
  • Contract start → churn
  • Machine installation → failure

Core Elements of TTE Data

Every Time-to-Event dataset must include:

  1. Start time
  2. Event definition
  3. Time duration

Start Time

Examples:

  • Date of enrollment
  • Date of diagnosis
  • Date of installation

Must be clearly defined and consistent

Event

An event is the outcome of interest:

  • Graduation
  • Failure
  • Death
  • Churn

Usually one event per subject

When the Event Has Not Occurred

  • Some subjects do not experience the event
  • Observation ends before the event occurs

➡ This situation is called censoring

What Is Censoring?

Censoring occurs when:

  • The event has not happened yet
  • We only know that survival time exceeds a certain value

Censoring ≠ missing data

Example of Time-to-Event Data

Subject Time (years) Event
A 1 1
B 2 1
C 3 0
D 4 1
E 4 0

Event = 1 → occurred
Event = 0 → censored

Survival Analysis

Why Survival Analysis?

Time-to-Event data:

  • Contain censored observations
  • Focus on duration
  • Cannot be analyzed using ordinary statistics

➡️ Require Survival Analysis

Definition of Survival Analysis

Survival Analysis is a statistical framework to:

  • Analyze time until an event
  • Handle censored data
  • Estimate survival probability and risk

Logical Flow of Analysis