Chapter 18 · Making sense of numbers

How do you measure risk and survival?

Incidence, prevalence, relative risk, odds ratio, NNT and Kaplan-Meier analysis.

19 TNMGRMU questions answered hereset 26 times, 2004–2025

The problem first

You are a second-year Surgery resident. Your thesis follows 90 patients for two years after surgery for colorectal cancer. Twenty patients stop coming to the clinic before two years, so you leave them out. Fifty of the remaining 70 are alive, and you write “two-year survival 71%”.

At the viva the examiner asks one question.

“Twenty patients were alive when you last saw them. Why did you leave them out?”

Start here

How many people are ill now, and how many became ill this year?

Prevalence counts everyone who has the disease at a given time. Incidence counts only new cases, among people who did not have the disease at the start.

123456789101 July: 3 of 10 illPerson1 Jan1 Apr1 Jul1 Oct31 Dec
Already ill on 1 JanuaryNew case during the year1 July
Teaching example, ten people. Incidence (risk) over the year = 4 new cases ÷ 7 people free of the disease on 1 January = 57%. Point prevalence on 1 July = 3 ill ÷ 10 = 30%. Period prevalence for the year = 7 people ill at any time ÷ 10 = 70%.

Incidence proportion (risk) = new cases in a period ÷ people at risk at the start

Incidence rate = new cases ÷ total person-time at risk

Point prevalence = all current cases at one time ÷ population at that time

Person-time
the sum of the time each person was followed while still at risk. One person followed for one year contributes one person-year.
At risk
able to develop the disease: not already ill, and still being followed
FeatureIncidencePrevalence
CountsNew cases onlyAll existing cases, old and new
DenominatorPeople at risk, or person-time at riskWhole population at that time
TimeOver a periodAt a point, or over a period
Usual designCohort study, register of new diagnosesCross-sectional survey
Used forCauses and risk factors, effect of preventionBurden of disease, planning beds and services
Affected by how long the disease lastsNoYes: longer illness means higher prevalence

Attack rate and secondary attack rate

In an outbreak, the incidence proportion over the short epidemic period is called the attack rate. The secondary attack rate counts new cases among the susceptible contacts of the first cases, within one incubation period. It shows how readily the infection spreads from person to person.

Attack rate = 36 ill ÷ 240 hostel residents = 15%

Secondary attack rate = 9 new cases ÷ 45 susceptible room-mates = 20%

Teaching example with made-up numbers. Despite its name, an attack rate is a proportion over a stated period, not a rate per unit of time. The incidence rate per person-time is also called incidence density.

Incidence, prevalence and duration

Why can a better treatment increase prevalence?

Prevalence depends on how many new cases appear and on how long each case lasts.

Incidence: new cases flow inPrevalence: cases present nowRecovery or death:cases flow outThe level rises whenmore new cases arrive, oreach case lasts longer.The level falls whenpatients recover or die sooner,or fewer new cases arrive.
Prevalence behaves in the same way as the water level in a bathtub. New cases (incidence) flow in. Cases flow out when patients recover or die. The level rises if more cases arrive or if each case lasts longer.

Prevalence ≈ incidence rate × average duration

2 per 1,000 person-years × 5 years = 0.010 → prevalence about 1%

This approximation holds only under two conditions.

  1. A steady state. Incidence and average duration are not changing over time, and people do not move into or out of the population in a way linked to the disease.
  2. An uncommon disease. The exact steady-state relation is P ÷ (1 − P) = I × D (Pearce, 2004). It reduces to P ≈ I × D only when 1 − P is close to 1.

I = 20 per 1,000 person-years, D = 10 years: I × D = 0.20, but exact P = 0.20 ÷ 1.20 = 16.7%, not 20%

The relation can also be used the other way round when only a survey and the average duration are available: incidence ≈ prevalence ÷ duration. Teaching example: a prevalence of 4 per 1,000 and an average duration of 3 months (0.25 years) give an incidence of about 16 per 1,000 person-years (16.1 with the exact form).

A treatment that keeps patients alive without curing them lengthens duration, so prevalence rises even when incidence does not change. Insulin in type 1 diabetes and antiretroviral therapy in HIV are examples. A faster cure, or a higher death rate, shortens duration and lowers prevalence.

Interactive

Change incidence and duration, and watch prevalence

Try this: keep the incidence at 2 per 1,000 person-years and move the duration from 5 to 10 years, as a treatment that keeps patients alive without curing them would. Watch the prevalence almost double.

Both values assume a steady state: incidence and average duration are not changing over time, and people do not move into or out of the population in a way linked to the disease.

2

More new cases → higher prevalence

5

Each case lasts longer → higher prevalence

0.99%exact steady-state prevalence
1.00%approximation, I × D

I × D = 2 per 1,000 person-years × 5 years = 0.010

Exact: P = 0.010 ÷ (1 + 0.010) = 0.99%

The approximation is higher than the exact value by a factor of 1 + I × D = 1.010. It is close to the exact value only when the disease is uncommon.

0%2.5%5%05101520average duration (years)prevalenceI × Dexact
exact: P = I × D ÷ (1 + I × D)approximation: P ≈ I × D

Comparing death rates

Why can a town with higher death rates at every age have a lower crude death rate?

A crude death rate mixes the death rate at each age with the age structure of the population. Standardisation removes the effect of age structure so that populations can be compared.

The crude death rate is the number of deaths in a year ÷ the mid-year population, usually per 1,000. An age-specific death rate is the same calculation within one age group. Death rates are much higher in old age, so a population with more old people can have a higher crude death rate even when its death rate at every age is lower.

Age (years)Town A peopleTown A deaths per 1,000Town B peopleTown B deaths per 1,000Standard population
0–2920,0000.550,0001.040,000
30–5950,0003.040,0004.040,000
60+30,00030.010,00040.020,000
All ages100,000crude 10.6100,000crude 6.1100,000

Teaching example with made-up numbers. Town A: 10 + 150 + 900 = 1,060 deaths. Town B: 50 + 160 + 400 = 610 deaths.

Town B has the higher death rate in every age group but the lower crude rate, because 10% of its people are aged 60 or more against 30% in town A. Age is linked both to which town people live in and to their chance of dying, so age confounds the comparison.

Direct standardisation

Apply each town's age-specific rates to the same standard population and count the deaths that would occur. With the standard population in thousands, each product below is a number of deaths.

Town A: 40 × 0.5 + 40 × 3.0 + 20 × 30.0 = 740 → 7.4 per 1,000

Town B: 40 × 1.0 + 40 × 4.0 + 20 × 40.0 = 1,000 → 10.0 per 1,000

After standardisation the order is reversed, and town B has the higher death rate. A standardised rate is useful only for comparison, and its value depends on the standard population chosen.

Indirect standardisation and the standardised mortality ratio

When the age-specific rates of a study population are not known, or rest on very few deaths, apply reference rates to the study population's own age structure. This gives the expected number of deaths. The standardised mortality ratio (SMR) is observed deaths ÷ expected deaths, often multiplied by 100. Teaching reference rates: 0.8, 3.5 and 35.0 per 1,000.

Town B expected deaths = 50 × 0.8 + 40 × 3.5 + 10 × 35.0 = 530

Town B: SMR = 610 ÷ 530 = 1.15, or 115

Town A expected deaths = 20 × 0.8 + 50 × 3.5 + 30 × 35.0 = 1,241

Town A: SMR = 1,060 ÷ 1,241 = 0.85, or 85

Town B had 15% more deaths than the reference rates predict, and town A about 15% fewer. Each SMR compares one town with the reference rates. Two SMRs are not strictly comparable with each other, because each is weighted by its own town's age structure.

FeatureDirect standardisationIndirect standardisation
NeedsAge-specific rates in each study population, and a standard populationTotal deaths and the age structure of the study population, and reference age-specific rates
ResultAge-standardised rate, for example per 1,000Standardised mortality ratio: observed ÷ expected
Use whenEach age group has enough deaths for a stable rateAge groups are small, or deaths by age are not known
Comparing populationsStandardised rates can be compared with each otherEach SMR compares one population with the reference
Teaching exampleTown A 7.4, town B 10.0 per 1,000Town A 85, town B 115

Interactive

Change the age structure of town B and watch the crude and standardised death rates

Try this: move town B's share aged 60 or more from 10% to 40%. Its crude death rate rises from 6.1 to 17.4 per 1,000, but its age-standardised rate stays at 10.0.

Teaching example, made-up numbers: two towns of 100,000 people. Town A has 30% of its people aged 60 or more.

10%

The rest of town B is split 5 to 4 between ages 0–29 and 30–59.

Town B death rates in each age group
10.6 and 6.1crude death rate per 1,000, town A and town B
7.4 and 10.0age-standardised death rate per 1,000, town A and town B

Town B has the lower crude death rate (6.1 against 10.6 per 1,000) but the higher age-standardised rate (10.0 against 7.4). Death rates are low at young ages, and town B has more young people, so its crude rate hides a higher death rate in every age group.

Age structureTown A30% aged 60 or moreTown B10% aged 60 or moreStandard20% aged 60 or more0–2930–5960+Deaths per 1,000 people a yearCrude rateAge-standardised rateTown A10.6Town B6.1Town A7.4Town B10.0Standard population: 40%, 40% and 20%
Population and death rates by age group
Age (years)Town A peopleTown A rateTown B peopleTown B rateStandard population
0–2920,0000.550,0001.040,000
30–5950,0003.040,0004.040,000
60+30,00030.010,00040.020,000
All ages100,000crude 10.6100,000crude 6.1100,000

town B standardised = (40,000 × 1.0 + 40,000 × 4.0 + 20,000 × 40.0) ÷ 1,000 = 1,000 deaths in 100,000 = 10.0 per 1,000

Life tables

How is life expectancy calculated from death rates?

A current life table applies this year's age-specific death rates to an imaginary group of 100,000 newborns and follows them until all have died.

A cohort (generation) life table follows people actually born in the same period until all of them have died, which takes about a century. A current (period) life table assumes instead that people will meet today's death rates at every age. Life expectancy at birth from a current life table therefore summarises present mortality. It is not a forecast for babies born this year. A complete life table uses single years of age, and an abridged life table uses age groups.

Age (years)qlDeathsLTe (years)
0–190.05100,0005,0001,950,0007,148,11571.5
20–390.0395,0002,8501,871,5005,198,11554.7
40–590.1092,1509,2151,750,8503,326,61536.1
60–790.4082,93533,1741,326,9601,575,76519.0
80+1.0049,76149,761248,805248,8055.0

Survivors at the next age: l × (1 − q) = 100,000 × 0.95 = 95,000

Person-years in the group: L = 20 × (100,000 + 95,000) ÷ 2 = 1,950,000

Last, open-ended group: L = l ÷ death rate = 49,761 ÷ 0.2 = 248,805

Life expectancy at 60: e = T ÷ l = 1,575,765 ÷ 82,935 = 19.0 years

q
probability of dying within the age group, for a person alive at its start
l
survivors at the start of the age group, out of 100,000 born
L
person-years lived within the age group, assuming deaths are spread evenly through it
T
person-years lived from that age onwards, the sum of L from that row to the last row
e
life expectancy, the average number of further years lived by people alive at that age

Teaching example with made-up death probabilities and a death rate of 0.2 per person-year at 80 years and over. Real life tables use narrower age groups, with special adjustments for the first year of life, where deaths are not spread evenly.

The same table gives other measures. Potential years of life lost adds up, for every death before a chosen age, the years between the age at death and that age. Health-adjusted life expectancy counts years lived in poor health as less than a full year of healthy life. The life table method is also used for survival after treatment, as the actuarial life table section below shows.

The formula

One 2 × 2 table, six measures

Teaching example with made-up numbers: a trial of DVT prophylaxis after surgery, 200 patients per group, outcome DVT within 30 days.

DVTNo DVTTotalRisk
Prophylaxisa = 30b = 17020030 ÷ 200 = 15%
No prophylaxisc = 50d = 15020050 ÷ 200 = 25%
No prophylaxisProphylaxis25 DVT per 10015 DVT per 10010 prevented(red rings)Treat 100, prevent 10Treat 10, prevent 1NNT = 100 ÷ 10 = 10
The same result per 100 patients. Prophylaxis prevented 10 DVTs for every 100 patients treated, so 10 patients must be treated to prevent one DVT.

Relative risk (RR) = 0.15 ÷ 0.25 = 0.60

Relative risk reduction (RRR) = 1 − RR = 1 − 0.60 = 40%

Absolute risk reduction (ARR) = 0.25 − 0.15 = 0.10, or 10 percentage points

Number needed to treat (NNT) = 1 ÷ ARR = 1 ÷ 0.10 = 10

Odds ratio (OR) = (a × d) ÷ (b × c) = (30 × 150) ÷ (170 × 50) = 0.53

Round the NNT up to the next whole patient. When a treatment causes harm, the same calculation gives the number needed to harm (NNH).

Read the table the other way: attributable risk

In a cohort study the exposure usually causes the outcome. Treat "no prophylaxis" as the exposure. The risk difference is then called the attributable risk.

Attributable risk (AR) = risk in exposed − risk in unexposed = 0.25 − 0.15 = 10 per 100

Attributable risk percent = AR ÷ risk in exposed = 0.10 ÷ 0.25 = 40%

RR for the exposure = 0.25 ÷ 0.15 = 1.67. AR and ARR are the same subtraction. AR is the name used when an exposure causes the outcome, ARR when a treatment prevents it. Write "attributable risk" for the difference and "attributable risk percent" for the proportion, so the reader knows which you mean.

Comparison

Why does the same 40% reduction give a different NNT?

Relative measures stay similar when the baseline risk changes. Absolute measures do not.

Baseline risk 25%ARR 10 points · NNT 10No prophylaxis25%Prophylaxis15%Baseline risk 5%ARR 2 points · NNT 50No prophylaxis5%Prophylaxis3%0%10%20%30%
The same relative risk reduction of 40% at two baseline risks. Cook and Sackett (1995) gave a real example: with a 40% relative reduction in stroke from treating hypertension, the NNT to prevent one stroke was 13 in moderate hypertension and 167 in mild hypertension.
FeatureRelative measuresAbsolute measures
ExamplesRR, RRR, OR, HRARR (risk difference), NNT
Change with baseline riskUsually similar across baseline risksSmaller ARR and larger NNT when baseline risk is low
Tells a patientBy what proportion the risk fallsHow many events are prevented per 100 treated
Can mislead whenBaseline risk is low: a small benefit looks largePopulations with different baseline risks are compared
In a trial reportGive bothGive both

Public health impact

How much disease in the whole population is due to the exposure?

The attributable fraction in the exposed depends only on the relative risk. The population attributable fraction also depends on how many people are exposed.

Attributable fraction in the exposed = (RR − 1) ÷ RR = (1.67 − 1) ÷ 1.67 = 40%

Population attributable fraction (PAF) = p(RR − 1) ÷ [p(RR − 1) + 1]

p
proportion of the population exposed
RR
relative risk of the disease in exposed compared with unexposed people

The first line is the attributable risk percent from the table above, written with the relative risk. Levin introduced the second formula in 1953 to estimate the population attributable fraction from the prevalence of a risk factor and its relative risk. It is biased when the association is confounded, even if an adjusted relative risk is used (Ferguson and colleagues, 2024).

ExposedRRPAFCases per 100,000 (risk 1% if unexposed)Cases if nobody were exposed
20%3.028.6%1,4001,000
2%10.015.3%1,1801,000
50%1.520.0%1,2501,000

Teaching examples with made-up numbers. A strong but rare exposure (RR 10, 2% exposed) accounts for fewer cases than a weak but common one (RR 1.5, 50% exposed). The relative risk measures the strength of an association. The population attributable fraction estimates how much of the disease in the population removing the exposure could prevent, if the association is causal.

Comparison

Risk or odds: what is the difference?

Risk divides the events by everyone in the group. Odds divide the events by the people who did not have the event.

Prophylaxis: risk = 30 ÷ 200 = 0.15, odds = 30 ÷ 170 = 0.176

No prophylaxis: risk = 50 ÷ 200 = 0.25, odds = 50 ÷ 150 = 0.333

OR = 0.176 ÷ 0.333 = 0.53, while RR = 0.60

FeatureRelative risk (RR)Odds ratio (OR)
ComparesRisks: events ÷ everyone in the groupOdds: events ÷ people without the event
DesignsCohort studies and trialsCase-control studies, and logistic regression in any design
No difference11
Rare outcome (3 vs 5 per 1,000)RR 0.60OR 0.599: almost the same
Common outcome (15% vs 25%)RR 0.60OR 0.53: further from 1 than the RR
Easy to explain to patientsYesLess so

Zhang and Yu (1998) pointed out that when the outcome occurs in more than 10% of the study population, the odds ratio no longer approximates the risk ratio, and they proposed a method to correct it. For a single 2 × 2 table the two are linked exactly:

RR = OR ÷ [(1 − P₀) + (P₀ × OR)] = 0.53 ÷ [0.75 + (0.25 × 0.53)] = 0.60

P₀ is the risk in the control (unexposed) group. The calculation uses the unrounded OR, 0.5294.

Interactive

Change the events in each group and watch RR, OR, ARR and NNT

Try this: set 6 DVTs with prophylaxis and 10 without. The relative risk reduction stays at 40%, but the NNT rises from 10 to 50.

Teaching example (made-up numbers): the DVT prophylaxis trial above, with 200 patients in each group.

30

Risk with prophylaxis: 15.0%

50

Risk without prophylaxis (baseline risk): 25.0%

10patients treated with prophylaxis to prevent one DVT (NNT)
MeasureWorkingResult
Risk with prophylaxis30 ÷ 20015.0%
Risk without prophylaxis50 ÷ 20025.0%
Relative risk (RR)0.150 ÷ 0.2500.60
Relative risk reduction (RRR)1 − 0.6040.0%
Absolute risk reduction (ARR)0.250 − 0.1500.100 (10.0 percentage points)
Number needed to treat (NNT)1 ÷ 0.10010
Odds ratio (OR)(30 × 150) ÷ (170 × 50)0.53

OR 0.53 is further from 1 than RR 0.60. The two are close only when the outcome is rare.

No prophylaxisProphylaxis25 DVT per 10015 DVT per 10010 preventedper 100 treated (red rings)

Dots show risk per 100 patients, rounded to whole patients.

Case-control studies

Why does a case-control study give an odds ratio and not a relative risk?

In a case-control study you decide how many controls to take. The proportion of cases in your table is set by you, so risk cannot be calculated.

Study A: 80 cases, 100 controlsCases40 exposed + 40 not exposedControls20 exposed + 80 not exposedOR = (40 × 80) ÷ (40 × 20) = 4.0"Risk" if exposed = 40 ÷ 60 = 67%Study B: the same 80 cases, 200 controlsCases40 exposed + 40 not exposedControls40 exposed + 160 not exposedOR = (40 × 160) ÷ (40 × 40) = 4.0"Risk" if exposed = 40 ÷ 80 = 50%the odds ratio stays 4.0, the "risk" changes
Teaching example. In the whole population, 2,040 exposed people produced 40 cases (risk 1.96%) and 8,040 unexposed people produced 40 cases (risk 0.50%): RR 3.94, OR 4.00. A case-control study takes all 80 cases and a sample of people without the disease. Doubling the controls changes the apparent "risk", but the odds ratio stays 4.0.

The odds ratio still works because the odds of exposure among cases ÷ the odds of exposure among controls equals the odds ratio of disease in exposed versus unexposed people. Here (40 ÷ 40) ÷ (20 ÷ 80) = 4.0. When the disease is rare, the odds ratio is close to the relative risk: 4.0 against 3.94. Cornfield described estimating comparative rates from case-control data in this way in 1951. The designs are covered in the study designs chapter.

Matched case-control studies

How is the odds ratio calculated when each case has a matched control?

In a matched analysis the unit is the pair. Pairs in which the case and the control have the same exposure give no information about the odds ratio.

Teaching example with made-up numbers: 120 patients with a disease, each matched to one control of the same age, sex and area. Exposure is recorded for both members of every pair.

PairsControl exposedControl not exposed
Case exposed30 (both exposed)40 (only the case exposed)
Case not exposed16 (only the control exposed)34 (neither exposed)

Matched OR = 40 ÷ 16 = 2.5

95% CI = exp[ln 2.5 ± 1.96 × √(1/40 + 1/16)] = 1.40 to 4.46

McNemar χ² = (|40 − 16| − 1)² ÷ (40 + 16) = 9.45, P = 0.002

The matched odds ratio divides the pairs in which only the case was exposed by the pairs in which only the control was exposed. The 30 pairs with both exposed and the 34 with neither exposed do not enter the calculation. Analysing the same 240 people as if they were unmatched, with 70 of 120 cases and 46 of 120 controls exposed, gives a different answer, OR 2.25. When controls have been matched, keep the pairs together in the analysis, with the matched odds ratio or with conditional logistic regression.

Precision

What do the confidence interval and P value add to an odds ratio?

The odds ratio comes from one sample. The 95% confidence interval gives the range of values compatible with the data. The P value tests whether the true ratio could be 1.

95% CI = exp[ln(OR) ± 1.96 × SE], where SE of ln(OR) = √(1/a + 1/b + 1/c + 1/d)

OR 0.53, 95% CI 0.32 to 0.88 · χ² = 6.25, P = 0.012

  • The interval does not include 1, so the result is statistically significant at the 5% level. This matches P below 0.05.
  • For ratios (OR, RR, HR), 1 means no difference. For differences (ARR), 0 means no difference.
  • In the same table: RR 0.60 (95% CI 0.40 to 0.90). ARR 10 points (95% CI 2.2 to 17.8). NNT 10 (95% CI 5.6 to 45.0). The NNT interval is found by inverting the limits of the ARR interval (Cook and Sackett, 1995).
  • When the ARR is not statistically significant, its interval includes 0 and the NNT interval passes through infinity. Teaching example: 50 and 40 events in 200 patients per group, ARR 5 points (95% CI −3.2 to 13.2), NNT 20. The interval runs from 31.5 patients treated to harm one (NNTH), through infinity, to 7.6 patients treated to benefit one (NNTB). Altman (1998) proposed the labels NNTB and NNTH and showed how to report such an interval.
  • The P value does not show how large the effect is. A wide interval shows an imprecise estimate, even when P is below 0.05.

P values in general are covered in the hypothesis testing chapter.

Confounding

How do you remove the effect of a confounder from an odds ratio?

Split the data into strata of the confounder, calculate the odds ratio in each stratum, and combine them with the Mantel-Haenszel method.

Teaching example with made-up numbers: a case-control study of an exposure and a disease. Older people are more often exposed and more often have the disease, so age can distort the crude odds ratio.

StratumExposed cases (a)Exposed controls (b)Unexposed cases (c)Unexposed controls (d)nOR
Younger1090203805002.11
Older90210301705002.43
Both ages combined100300505501,0003.67

OR(MH) = Σ(a × d ÷ n) ÷ Σ(b × c ÷ n)

= (3,800 ÷ 500 + 15,300 ÷ 500) ÷ (1,800 ÷ 500 + 6,300 ÷ 500)

= (7.6 + 30.6) ÷ (3.6 + 12.6) = 38.2 ÷ 16.2 = 2.36

The crude odds ratio (3.67) is larger than the odds ratio in either age group (2.11 and 2.43), because age is linked to both the exposure and the disease. The Mantel-Haenszel odds ratio, 2.36, is the age-adjusted estimate. Pooling is sensible only when the stratum odds ratios are similar. If they differ greatly, report them separately, because the effect differs between the strata (effect modification).

Stratification works for a small number of categorical confounders. With several confounders, use logistic regression, described in the Practical Statistics chapter on logistic regression, or a propensity score, described in the chapter on propensity scores. Confounding itself is explained in the bias and validity chapter.

Survival analysis

What do you do with patients whose follow-up ends before the event?

Survival analysis studies the time from a starting point to an event, such as death or relapse. Patients enter on different dates, and some leave before the event. Their time is still used.

Calendar timeTime since each patient entered123456lost to follow-upstudy ends01224 monthsdiedcensored: lost to follow-up, or alive when the study ended
Left: patients enter on different dates. Right: each patient's time is counted from his or her own entry. A patient is censored when follow-up ends without the event: lost to follow-up, withdrawn, or alive when the study closes. We know only that the patient survived at least until that time.

Removing censored patients, as in the opening case, keeps every death but removes people who were alive, so survival is underestimated. Counting them as alive for the whole period overestimates it. The Kaplan-Meier method uses each patient's time up to censoring. It assumes that patients who are censored have the same survival prospects as those who continue to be followed (Goel et al., 2010).

  • Right censoring: the event had not happened by the last contact. This is the usual type, and the one the Kaplan-Meier method handles.
  • Left censoring: the event is known to have happened before observation began, but not when.
  • Interval censoring: the event is known only to have happened between two visits, as when a complication is found at a scheduled review.

The Kaplan-Meier method

How is a Kaplan-Meier curve calculated?

At each death, work out the fraction of patients at risk who survived it. Multiply these fractions in order. The product is the probability of surviving to that time.

S(t) = S(previous death time) × (n − d) ÷ n

n
patients still at risk just before that time: not dead and not yet censored
d
deaths at that time

Teaching data, standard treatment, 15 patients. Months to death, with + for censored: 1, 2, 3+, 4, 5, 7, 8, 9+, 10, 12, 14, 16+, 18, 22+, 24+.

MonthAt risk (n)Deaths (d)(n − d) ÷ nS(t)
115114/150.933
214113/140.867
412111/120.794
511110/110.722
71019/100.650
8918/90.578
10716/70.495
12615/60.413
14514/50.330
18312/30.220

At month 4 only 12 patients are at risk: 2 have died and 1 was censored at month 3. A censored patient leaves the denominator but does not cause a drop in the curve.

The standard error of S(t) comes from the numbers at risk and the deaths up to that time. For standard treatment at 12 months:

SE[S(t)] = S(t) × √Σ d ÷ [n(n − d)], summed over death times up to t

SE = 0.413 × √0.1091 = 0.136 → 95% CI 0.146 to 0.680

With only 6 patients still at risk, the interval is wide. This simple interval can fall below 0 near the end of a curve: at 18 months here it would start at −0.026.

0%25%50%75%100%06121824Months since randomisationmedian 10median 23new drugstandardNumber at riskStandardNew drug151510146123915
New drugStandard treatmentMedian survival
Teaching data, 15 patients per group. Each drop is a death. Each short vertical tick is a censored patient. Median survival is the time at which the curve first reaches 50% or below: 10 months with standard treatment and 23 months with the new drug. If a curve never falls to 50%, the median is reported as "not reached". The numbers at risk show how few patients support the right-hand end of each curve. Draw the curve as steps: joining the points with sloping lines is incorrect (Goel et al., 2010).

Interactive

Switch patients between died and censored, and watch the Kaplan-Meier curve

Try this: change the death at month 10 to censored. Watch the drop at month 10 disappear and the median move to 12 months.

Teaching data from the table above: 15 patients on standard treatment. Each box is one patient, labelled with the months of follow-up.

Died or censored

Ticked (red border) = died. Unticked = censored.

0%25%50%75%100%06121824Monthsmedian 10At risk1510631
Kaplan-Meier curve (ticks = censored)median survival
10months: median survival
41.3%survival at 12 months

10 deaths and 5 censored patients.

MonthAt risk (n)Deaths (d)(n − d) ÷ nS(t)
115114/150.933
214113/140.867
412111/120.794
511110/110.722
71019/100.650
8918/90.578
10716/70.495
12615/60.413
14514/50.330
18312/30.220

The life table method

What if you only know the interval in which each death happened?

The actuarial (life table) method groups follow-up into intervals. A patient censored during an interval is counted as at risk for half of it.

q = d ÷ (n − c ÷ 2), and S = product of (1 − q) over the intervals

n
patients alive and followed at the start of the interval
d
deaths during the interval
c
patients censored during the interval

The same 15 standard-treatment patients, in 6-month intervals:

Monthsndcn − c/2qS at the endKaplan-Meier at the same time
0–6154114.50.2760.7240.722
6–1210319.50.3160.4950.495
12–186215.50.3640.3150.330
18–243122.00.5000.1580.220

First interval: q = 4 ÷ 14.5 = 0.276, S = 1 − 0.276 = 0.724

The two methods agree closely while many patients remain, and differ at the right-hand end, where few are at risk. The Kaplan-Meier method uses the exact times, so it is preferred when they are known. The life table method suits large studies with follow-up at fixed visits, and it is the basis of population life tables.

FeatureActuarial life tableKaplan-Meier
TimeFixed intervalsEach exact event time
Censored patientsAt risk for half the intervalAt risk until their exact censoring time
CurveChanges at the end of each intervalDrops at each death
SuitsLarge numbers, or events known only to an intervalExact event times, in small or large studies
Teaching data at 24 months0.1580.220

Comparing curves

Are the two survival curves different?

The log-rank test compares the deaths observed in each group with the deaths expected if both groups had the same survival.

At each death time, expected deaths in a group = all deaths at that time × (that group's number at risk ÷ total number at risk). Add these across every death time.

GroupObserved deaths (O)Expected deaths (E)O − E
Standard105.70+4.30
New drug711.30−4.30

χ² = Σ (O − E)² ÷ E = 4.30² ÷ 5.70 + 4.30² ÷ 11.30 = 4.87, 1 degree of freedom, P = 0.027

  • Statistical software uses a version with the exact variance: χ² = 5.12, P = 0.024. Both lead to the same conclusion here.
  • The test compares the whole curves, not survival at one time point.
  • It gives a P value only. It does not tell you how large the difference is. For that you need the hazard ratio.
  • It assumes the hazard ratio is roughly constant over time (Goel et al., 2010). Curves that cross are a warning sign.

Survival at one fixed time, such as 1 year, can be compared between groups, but the result depends on the time chosen. The log-rank test uses every death time and gives each the same weight. The generalised Wilcoxon (Gehan) test weights each death time by the number at risk, so early deaths count for more, and the Tarone-Ware test uses the square root of the number at risk, a weight between the two.

Hazard ratio and Cox regression

What does a hazard ratio of 0.33 mean?

Hazard is the event rate at a given moment among patients who have not yet had the event. The hazard ratio compares that rate between two groups.

1 = no differenceRisk ratiodeaths ÷ patients0.70Rate ratiodeaths ÷ person-months0.40Hazard ratioCox regression0.33 (0.12 to 0.90)0.10.250.512ratio, new drug vs standard (log scale)
The same teaching trial summarised three ways. Risk ratio: deaths by 24 months ÷ patients (7/15 vs 10/15), ignoring when deaths happened and who was followed for less time. Rate ratio: deaths ÷ person-months (7 in 274.5 vs 10 in 155, that is 2.55 vs 6.45 per 100 person-months), assuming a constant rate. Hazard ratio from Cox regression: 0.33 (95% CI 0.12 to 0.90), comparing the groups at each death time.

h(t) = h₀(t) × exp(b₁x₁ + b₂x₂ + …)

h₀(t)
baseline hazard: the hazard when every x is 0. Its shape over time is left unspecified.
x
explanatory variables: treatment group, age, stage
exp(b)
the hazard ratio for a one-unit change in x, with the other variables held constant
  • HR 0.33: at any time during follow-up, patients on the new drug died at about one-third the rate of patients on standard treatment. The hazard was 67% lower.
  • For a harmful event, HR below 1 favours the new treatment and HR above 1 means a higher event rate.
  • Cox regression adjusts the hazard ratio for other variables, in the same way that multiple regression adjusts a difference in means. See the correlation and regression chapter.
  • The model assumes proportional hazards: the hazard ratio is constant over time. Check this before relying on one hazard ratio.
  • A hazard is a rate, not a probability, so it can be greater than 1. The standard-treatment group had 10 deaths in 155 person-months, 0.065 per person-month or 0.77 per person-year. A risk can never be greater than 1.
  • Proportional hazards can be checked by plotting log(−log S(t)) against log time for each group, where the lines should be roughly parallel, or by testing an interaction between the variable and time in the Cox model. When the hazards are not proportional, see the Practical Statistics chapter on Cox regression.
  • Rates (events ÷ person-time) are compared with Poisson regression, covered in the Practical Statistics chapter on count models.
  • A real trial: in START, immediate versus deferred antiretroviral therapy, the primary end point occurred at 0.60 vs 1.38 events per 100 person-years, hazard ratio 0.43 (95% CI 0.30 to 0.62) (Lundgren et al., 2015).
FeatureRelative riskHazard ratio
ComparesProportion with the event by the end of follow-upEvent rate at each moment among those still at risk
Uses the timing of eventsNoYes
Handles censoring and unequal follow-upNo: needs complete follow-up for a fixed periodYes
Usual method2 × 2 tableCox proportional hazards regression
Main assumptionEveryone followed for the same periodHazard ratio constant over time
In the teaching trial0.700.33

Survival distributions

What shape can the hazard take over time, and why does it matter?

A constant hazard gives an exponential survival curve. A rising or a falling hazard bends the curve in different ways, even with the same median.

Hazard (events per month)00.10.20.3constantrisingfallingProportion surviving0%50%100%all medians 1019%2%34%0012122424monthsmonths
constant hazard (exponential)rising hazard (Weibull shape 2)falling hazard (Weibull shape 0.5)
Teaching curves with the same median survival of 10 months. Left: the hazard over time. Right: the survival curves. At 24 months, 19% survive with a constant hazard, 2% with a rising hazard and 34% with a falling hazard.

With a constant hazard λ, the chance of the event in the next month is the same however long a patient has already survived. Survival times then follow an exponential distribution.

S(t) = e−λt, median = 0.693 ÷ λ, mean = 1 ÷ λ

Standard treatment: λ = 10 ÷ 155 = 0.0645 per month

Median = 0.693 ÷ 0.0645 = 10.7 months, S(12) = e−0.0645 × 12 = 0.461

  • The Kaplan-Meier estimates for the same patients are a median of 10 months and S(12) = 0.413. The exponential model is a smooth approximation that assumes the hazard does not change.
  • The exponential distribution has no memory. A patient alive at 12 months has the same 67.9% chance of surviving another 6 months as a new patient has of surviving the first 6.
  • With a constant hazard, 63.2% of patients have the event before the mean survival time, so the mean (15.5 months here) is longer than the median (10.7 months).
  • The Weibull distribution adds a shape parameter. The hazard rises over time when the shape is above 1, as with ageing or a progressive disease, falls when it is below 1, as when the risk is highest soon after an operation, and is constant when it equals 1, which is the exponential case (Clark et al., 2003).
  • Cox regression does not assume any of these shapes. It assumes only that the ratio of the hazards stays constant. Parametric models such as exponential and Weibull regression are an option when the shape is known.

Decide

Which measure fits your study design?

Answer the questions. Each answer links to the section that explains it.

What is your study design?

Which measure: all possible answers
  • Prevalence, prevalence ratio or prevalence odds ratio: A survey counts existing cases, so it gives prevalence. It cannot give incidence.
  • Risk, relative risk and attributable risk: Risk in each group = events ÷ people followed. Compare with RR (a ratio) and AR (a difference).
  • Incidence rate and rate ratio: Events ÷ person-time in each group. The rate ratio compares them and assumes a roughly constant rate.
  • Kaplan-Meier curves, log-rank test and hazard ratio: Kaplan-Meier to describe survival, log-rank to compare groups, Cox regression for the hazard ratio.
  • Odds ratio: You choose the number of controls, so risk cannot be calculated. The odds ratio is close to the relative risk only when the disease is rare.
  • RR, RRR, ARR and NNT: Give a relative measure and an absolute measure, each with a 95% CI (CONSORT 2025 item 26).
  • Sensitivity, specificity and likelihood ratios: Accuracy studies use different measures.
  • Age-standardised rates or the SMR: Direct standardisation when each age group has enough deaths. Indirect standardisation, giving a standardised mortality ratio, when the groups are small.

By specialty

Risk and survival problems by specialty

A trial reports that a drug lowers the risk of stroke by 40% in relative terms. Your patient has a much lower baseline risk than the patients in the trial.

Apply the relative risk reduction to your patient's own baseline risk to get the absolute reduction and the NNT. A lower baseline risk gives a larger NNT.

Common myths

Common mistaken beliefs

  • Myth: An odds ratio is the same as a relative risk.

    They are close only when the outcome is rare. With 25% and 15% risks, OR 0.53 and RR 0.60. With 5 and 3 per 1,000, OR 0.599 and RR 0.60.

  • Myth: A 40% relative risk reduction means the same benefit for every patient.

    The absolute benefit depends on baseline risk. At 25% baseline risk the NNT is 10. At 5% it is 50.

  • Myth: Patients lost to follow-up should be removed from a survival analysis.

    Censor them at their last contact. The time they were observed alive still counts.

  • Myth: Median survival is the average survival time.

    It is the time at which the Kaplan-Meier curve reaches 50%. If the curve stays above 50%, the median is "not reached".

  • Myth: A hazard ratio of 0.5 means patients live twice as long.

    It means the event rate is halved at any moment during follow-up. How many extra months that gives depends on the baseline hazard. Read the medians and the curves for time.

  • Myth: The right-hand end of a Kaplan-Meier curve is as reliable as the start.

    Few patients remain at risk, so each death causes a large drop. In the teaching data, 1 standard-treatment patient was at risk at 24 months.

Why this matters to you

Five consequences of choosing the wrong measure

  1. A protocol that measures the wrong thing

    A one-visit survey cannot give incidence. A title that promises incidence from a cross-sectional design will be questioned by the research committee.

  2. A wrong survival figure in your thesis

    Removing patients lost to follow-up, as in the opening case, underestimates survival.

  3. A common viva error

    Reporting "risk" or "relative risk" from a case-control study.

  4. Misreading papers

    The same 40% relative reduction means 10 fewer events per 100 patients at 25% baseline risk, and only 2 fewer at 5%.

  5. Unclear advice to patients

    A patient cannot weigh a treatment from "40% fewer DVTs" alone. Give the absolute change: 25 in 100 becomes 15 in 100.

History

History of risk and survival measures

  1. 1951

    Cornfield

    Published "A method of estimating comparative rates from clinical data", using case-control data on cancer of the lung, breast and cervix. The odds ratio from such data approximates the relative risk when the disease is rare.

  2. 1953

    Levin

    Introduced a method of estimating the population attributable fraction from the prevalence of a risk factor and its relative risk.

  3. 1958

    Edward Kaplan and Paul Meier

    Published "Nonparametric estimation from incomplete observations" in the Journal of the American Statistical Association: the method for estimating survival when some follow-up is incomplete. It is also called the product-limit estimate.

  4. 1959

    Mantel and Haenszel

    Published "Statistical aspects of the analysis of data from retrospective studies of disease", with a method of combining 2 × 2 tables from separate strata. The Mantel-Haenszel method is still used for odds ratios.

  5. 1966

    Mantel

    Applied the combination of 2 × 2 tables, one at each death time, to the comparison of survival data.

  6. 1972

    Richard Peto and Julian Peto

    Described the logrank test as particularly appropriate for comparing life tables, including in clinical trials.

  7. 1972

    D.R. Cox

    Published "Regression models and life-tables": the hazard is a function of explanatory variables multiplied by an unspecified function of time. This is the Cox proportional hazards model.

  8. 1980

    Freeman and Hutchison

    Set out how prevalence, incidence and duration are related in a steady-state population, so that two of them can be used to obtain the third.

  9. 1988

    Laupacis, Sackett and Roberts

    Introduced the number of patients a clinician needs to treat to prevent one adverse event: the number needed to treat.

  10. 1998

    D.G. Altman

    Suggested the labels NNTB and NNTH, and showed how to report a confidence interval for the number needed to treat when it includes infinity.

  11. 1998

    Zhang and Yu

    Showed that when an outcome occurs in more than 10% of a study population, the odds ratio no longer approximates the risk ratio, and proposed a correction.

Guidelines

Risk and survival in reporting guidelines

CONSORT 2025, item 26

For each primary and secondary outcome, by group: the “result for each group, and the estimated effect size and its precision (such as 95% confidence interval)” and, “for binary outcomes, presentation of both absolute and relative effect size”.

STROBE (2007), item 16

Give “unadjusted estimates and, if applicable, confounder-adjusted estimates and their precision (e.g., 95% confidence interval)”, and “if relevant, consider translating estimates of relative risk into absolute risk for a meaningful time period”.

STROBE (2007), item 12

Cohort study: “if applicable, explain how loss to follow-up was addressed”. Case-control study: “if applicable, explain how matching of cases and controls was addressed”.

RECIST 1.1 (2009)

Partial response is “at least a 30% decrease in the sum of diameters of target lesions, taking as reference the baseline sum diameters”. Progression needs a 20% increase over the smallest sum, plus an absolute increase of at least 5 mm. The −30% line on a waterfall plot marks the partial response threshold (Kim and Prasad, 2019).

Steps

Kaplan-Meier analysis, step by step

  1. Define time zero (randomisation, diagnosis or surgery) and the event (death from any cause, relapse).
  2. For each patient, record the time from time zero to the event or to censoring, and whether the event happened.
  3. Sort the times. At each event time, count the patients at risk and the events.
  4. Calculate (n − d) ÷ n at each event time and multiply in order to get S(t).
  5. Draw a step curve for each group with censoring ticks and the numbers at risk below the time axis.
  6. Read the median survival and the survival at fixed times, such as 1 year, with 95% CIs.
  7. Compare the groups with the log-rank test.
  8. Estimate the size of the difference with a hazard ratio from Cox regression, and check that the hazards are proportional.
  9. Report the number censored in each group and the length of follow-up.

Reading a paper

Five checks on any paper that reports risk or survival

  • Does the measure fit the design: OR from a case-control study, RR or HR from a cohort study or trial?
  • Is the risk in each group, or the ARR or NNT, given next to every relative measure?
  • Are the numbers at risk shown under the Kaplan-Meier curves, and how many patients were censored in each group?
  • Was follow-up long enough, and was loss to follow-up similar in the groups?
  • Is the hazard ratio given with a 95% CI, and did the authors check proportional hazards (do the curves cross)?

Why is it called that?

Word surgery

“Risk”

In everyday speech

A danger, or the chance that something bad happens.

In research

The proportion of a group that develops the outcome over a stated period. It can refer to a good outcome too.

“Censored”

In everyday speech

Cut or banned by an official.

In research

Follow-up ended before the event was seen. The patient's time up to that point is still used.

“Survival”

In everyday speech

Staying alive.

In research

Time until any defined event: death, relapse, discharge or full feeds.

Memory trick

Risk: events ÷ everyone. Odds: events ÷ those without the event. NNT: 100 ÷ ARR in percentage points.

Incidence

Late Latin incidentia, from incidere: "to happen, befall"

New cases that happen in a population during a period.

Prevalence

Latin praevalere: "to be more able", from prae (before) + valere (be strong)

How widespread a disease is at a time: all existing cases. The sense "condition of being widespread" dates from 1713.

Hazard

Old French hasard: a game of chance played with dice

In survival analysis, the event rate at a moment among people still at risk.

Odds

from odd: "unequal things"; later the chance in favour of something happening

Events divided by non-events. Odds of 1 means the event is as likely as not.

Censor

Latin censere: "to appraise, value, judge"

In survival analysis, a censored observation is one whose follow-up ended before the event was seen.

Cohort

Latin cohors: "enclosure", later a company of soldiers

A group followed forward over time. The sense "group of persons having a common statistical characteristic" dates from 1944.

Exam answers

Model answer outlines

Odds ratio, with its confidence interval and P value

DM Critical Care Medicine 2024 · MCh Gynaecological Oncology 2019, 2022 · DM Neonatology 2022 · DM Cardiology 2019 · MD Community Medicine 2005
  1. Definition: the ratio of the odds of an outcome (or exposure) in one group to the odds in another. From a 2 × 2 table with exposure in rows and outcome in columns, OR = ad ÷ bc.
  2. Odds: events ÷ non-events. Risk: events ÷ total.
  3. Interpretation: OR = 1, no association. OR above 1, exposure linked with higher odds. OR below 1, lower odds (protective).
  4. Uses: the ratio measure for case-control studies, the prevalence odds ratio in cross-sectional studies, adjusted ORs from logistic regression, and pooling binary outcomes in meta-analysis.
  5. Why case-control studies give only an OR: the researcher fixes the number of controls, so risk cannot be calculated. The exposure odds ratio equals the disease odds ratio.
  6. Relation to RR: close to RR when the outcome is rare (Cornfield 1951). When the outcome exceeds 10%, OR is further from 1 than RR (Zhang and Yu 1998). Example: RR 0.60, OR 0.53 at 25% vs 15% risk.
  7. 95% CI: exp[ln OR ± 1.96 √(1/a + 1/b + 1/c + 1/d)]. Example OR 0.53 (0.32 to 0.88). A CI that excludes 1 means significance at the 5% level. The width shows precision.
  8. P value: the probability of a result at least this extreme if the true OR were 1, usually from the chi-square test on the 2 × 2 table (example χ² 6.25, P 0.012). The P value gives no information about the size of the effect, so report the OR with its CI.
  9. Matched case-control study: OR = pairs in which only the case was exposed ÷ pairs in which only the control was exposed. Example 40 ÷ 16 = 2.5 (95% CI 1.40 to 4.46), tested with McNemar's test (χ² 9.45, P 0.002).
  10. Confounding: stratify by the confounder and combine the strata with the Mantel-Haenszel OR = Σ(ad/n) ÷ Σ(bc/n). Example: crude OR 3.67, age-adjusted OR 2.36.

Attributable risk and number needed to treat (NNT)

MD Community Medicine 2018 · MCh Surgical Oncology 2025
MeasureFormulaTeaching exampleMeaning
Relative riskIe ÷ Iu25% ÷ 15% = 1.67Strength of association
Attributable risk (risk difference)Ie − Iu25 − 15 = 10 per 100Cases among the exposed that are due to the exposure
Attributable risk percent(Ie − Iu) ÷ Ie × 10010 ÷ 25 = 40%Share of the exposed group's risk due to the exposure
Population attributable riskIt − Iuneeds incidence in the total population (It)Cases in the whole population due to the exposure
Attributable fraction in the exposed(RR − 1) ÷ RR(1.67 − 1) ÷ 1.67 = 40%Same as attributable risk percent
Population attributable fractionp(RR − 1) ÷ [p(RR − 1) + 1]p 0.2, RR 3: 28.6%Share of all cases in the population due to the exposure (Levin, 1953)
Absolute risk reductionCER − EER25% − 15% = 10 pointsEvents prevented per 100 treated
Relative risk reductionARR ÷ CER10 ÷ 25 = 40%Proportion of the control risk removed
NNT1 ÷ ARR1 ÷ 0.10 = 10Patients treated to prevent one event
  • Ie, Iu: incidence in exposed and unexposed. CER, EER: event rate in control and experimental groups.
  • NNT was introduced by Laupacis, Sackett and Roberts (1988). Round up. State the comparator and the time period.
  • 95% CI of NNT: invert the limits of the CI of ARR (example 5.6 to 45.0).
  • If the ARR is not statistically significant, its CI includes 0 and the NNT interval passes through infinity. Report it from NNTH to NNTB (Altman, 1998), for example NNTH 31.5 to ∞ to NNTB 7.6.
  • NNT depends on baseline risk: the same RRR of 40% gives NNT 10 at 25% baseline risk and NNT 50 at 5%.
  • For harms, the same calculation gives the number needed to harm (NNH).
  • Attributable risk is used for public health decisions: removing the exposure would prevent that many cases, if the association is causal.

Incidence and prevalence

Ph.D. RM 2015, 2018
  1. Incidence: new cases in a defined population during a period. Incidence proportion (risk) = new cases ÷ population at risk at the start. Incidence rate = new cases ÷ person-time at risk.
  2. Prevalence: all existing cases, old and new. Point prevalence at one time. Period prevalence over an interval.
  3. Sources: incidence from cohort studies and registers of new diagnoses. Prevalence from cross-sectional surveys.
  4. Relation: prevalence ≈ incidence × average duration, in a steady state and for an uncommon disease. Exact form: P ÷ (1 − P) = I × D. Example: 2 per 1,000 person-years × 5 years ≈ 1%.
  5. Prevalence rises with: more new cases, longer duration, treatment that prolongs life without cure, arrival of cases or better detection.
  6. Prevalence falls with: fewer new cases, faster cure, higher case fatality, departure of cases.
  7. Uses: incidence for causes, risk factors and the effect of prevention. Prevalence for disease burden and planning services.
  8. Attack rate: incidence proportion during an outbreak (36 of 240 = 15%). Secondary attack rate: new cases among susceptible contacts within one incubation period (9 of 45 = 20%).
  9. Incidence from prevalence: incidence ≈ prevalence ÷ average duration (4 per 1,000 ÷ 0.25 years ≈ 16 per 1,000 person-years).
  10. Comparing populations: crude rates are distorted by differences in age structure. Use age-standardised rates, or the standardised mortality ratio when groups are small.

Compare risk (incidence per person-years) with hazard rate, and relative risk with hazard ratio

MD Community Medicine 2019, 2023
FeatureRisk (cumulative incidence) and RRIncidence rate (person-years) and rate ratioHazard rate and hazard ratio
NumeratorNew casesNew casesEvents at a moment
DenominatorPeople at risk at the startTotal person-time at riskPeople still at risk at that moment
UnitsNone (a proportion over a stated period)Per person-time, e.g. per 1,000 person-yearsPer unit time
Unequal follow-up and censoringNot handledHandled through person-timeHandled
Uses the timing of eventsNoNo (one average rate)Yes
AssumptionComplete follow-up for the periodConstant rate over the periodHazard ratio constant over time (Cox model)
Method2 × 2 tableEvents ÷ person-time, Poisson methodsKaplan-Meier, log-rank, Cox regression
Teaching trial7/15 vs 10/15, RR 0.702.55 vs 6.45 per 100 person-months, ratio 0.40HR 0.33 (0.12 to 0.90)
  • Similarities: all compare an exposed or treated group with a reference group, and for all three ratios 1 means no difference.
  • RR answers "what proportion had the event by the end?". HR answers "how fast do events happen in one group compared with the other, at any moment?".
  • If the hazard is constant over time, the hazard rate equals the incidence rate.
  • A hazard is a rate, so it can exceed 1 (0.065 per person-month is 0.77 per person-year). A risk is a proportion and cannot exceed 1.
  • With a constant hazard λ, survival is exponential: S(t) = e−λt and median survival = 0.693 ÷ λ.
  • Real example: START trial, 0.60 vs 1.38 events per 100 person-years, HR 0.43 (0.30 to 0.62).

Survival analysis: definition and methods

DM Neonatology 2020, 2023 · MD Community Medicine 2018, 2020, and undated
  1. Definition: analysis of the time from a defined starting point to an event (death, relapse, discharge).
  2. Why special methods: follow-up differs between patients, some are censored, and survival times are usually skewed.
  3. Key terms: survival time, censoring (right-censoring is the usual type), survival function S(t), hazard, median survival.
  4. Describing survival: life table (actuarial) method with fixed intervals, and the Kaplan-Meier (product-limit) method using exact event times.
  5. Types of censoring: right (event not seen by the last contact, the usual type), left (event known to have happened before observation began) and interval (event known only to lie between two visits).
  6. Life table method: patients censored in an interval count as at risk for half of it, q = d ÷ (n − c/2). Kaplan-Meier is preferred when exact times are known.
  7. Shape of the hazard: constant (exponential), rising or falling (Weibull). Cox regression assumes no shape, only proportional hazards.
  8. Comparing groups: log-rank test.
  9. Adjusting for other variables: Cox proportional hazards regression, giving hazard ratios. Parametric models (exponential, Weibull) assume a shape for the hazard.
  10. Reported as: median survival, survival at fixed times (1-year, 5-year), hazard ratio with 95% CI, numbers at risk.
  11. Assumptions: censoring unrelated to prognosis, similar survival for patients recruited early and late, and proportional hazards for log-rank and Cox.
  12. Uses: cancer and transplant survival, time to relapse, time to recovery in neonatal and community studies.

Kaplan-Meier analysis and the Kaplan-Meier curve

MCh Surgical Oncology 2025 · DM Cardiology 2022 · Ph.D. RM 2014, 2017 · MCh Cardio Vascular and Thoracic Surgery 2004, 2015
  1. Origin: Kaplan and Meier, Journal of the American Statistical Association, 1958. Also called the product-limit estimate.
  2. Principle: survival to time t is the product of the fractions surviving each event time: S(t) = S(previous) × (n − d) ÷ n.
  3. Censored patients count in the number at risk until they are censored, then leave the denominator without a drop in the curve.
  4. Worked table: 15 patients, deaths at 1, 2, 4, 5, 7, 8, 10, 12, 14 and 18 months, censored at 3, 9, 16, 22 and 24. S(10) = 0.495, so median survival = 10 months.
  5. The curve: a step function, y-axis proportion surviving, x-axis time. Ticks mark censoring. Numbers at risk under the axis.
  6. Reading it: median survival where S(t) first reaches 0.5, survival at fixed times, and a vertical gap between curves (difference in survival at a time) or a horizontal gap (difference in time to reach a survival level).
  7. Comparing curves: log-rank test (example χ² 4.87, P 0.027). Size of effect: hazard ratio from Cox regression (example HR 0.33).
  8. Precision: SE of S(t) = S(t) × √Σ d ÷ [n(n − d)]. Example S(12) 0.413, SE 0.136, 95% CI 0.146 to 0.680, wide because few patients remain.
  9. Assumptions: non-informative censoring, similar survival prospects for early and late recruits, event time known.
  10. Limitations: the right-hand tail is unreliable with few patients at risk, it does not adjust for other variables, and it treats competing events as censoring.

Kaplan-Meier curve, funnel plot and waterfall plot

DM Neonatology 2024 · DM Medical Oncology 2023

Kaplan-Meier curve: see the outline above.

Funnel plot (meta-analysis):

  • Each study's effect estimate plotted against its sample size or precision.
  • Larger studies give more precise estimates and lie near the pooled effect at the top. Smaller studies scatter more widely at the bottom, so an unbiased set of studies forms a symmetrical inverted funnel.
  • Asymmetry suggests publication bias or other small-study effects. Egger et al. (1997) measured it by regression of the standard normal deviate against precision.
  • Few small studies make the test unreliable. See the systematic review chapter.

Waterfall plot (oncology):

  • An ordered bar chart: each vertical bar is one patient's best percentage change in tumour size from baseline.
  • Bars run from the largest increase on the left to the largest shrinkage on the right. Bars above 0 show growth, below 0 shrinkage.
  • A line at −30% marks the RECIST 1.1 partial response threshold. Progression is at least a 20% increase plus at least 5 mm.
  • Limitations (Kim and Prasad, 2019): it shows the single best scan without confirmation, and leaves out patients who could not be assessed. Response rates read from waterfall plots were a median 6.1% higher than investigator-assessed rates.
  • It shows response, not survival or its duration.

How do you assess the effectiveness of antiretroviral therapy in an HIV clinical trial using Kaplan-Meier analysis?

Ph.D. RM 2020
  1. Design: randomised controlled trial, for example immediate versus deferred ART, or a new regimen versus standard ART. Define eligibility and randomise.
  2. Time zero: the date of randomisation.
  3. Event: a pre-specified primary end point, such as a serious AIDS-related event, serious non-AIDS event or death, or time to virological failure.
  4. Follow-up data: for each patient, the time to the event or to censoring (lost to follow-up, withdrawn, alive and event-free at the closing date), and the event status.
  5. Kaplan-Meier estimate for each arm: at each event time, the number at risk and the events. Multiply (n − d) ÷ n in order to get S(t).
  6. Plot: step curves for both arms with censoring ticks and numbers at risk. Some trials plot the cumulative percentage with the event (1 − S(t)) instead.
  7. Summaries: median time to the event (or "not reached") and the event-free proportion at 1, 2 and 3 years with 95% CIs.
  8. Compare arms: log-rank test. Null hypothesis: the survival curves are the same.
  9. Size of effect: hazard ratio with 95% CI from Cox regression, by intention to treat. Check proportional hazards. Add an absolute difference at a fixed time.
  10. Example: START (N Engl J Med 2015): 4,685 HIV-positive adults with CD4+ counts above 500 per mm³ were randomised to immediate or deferred ART. The authors used Kaplan-Meier curves and Cox models. The primary end point occurred in 42 vs 96 patients, 0.60 vs 1.38 events per 100 person-years, HR 0.43 (95% CI 0.30 to 0.62, P < 0.001). The HR did not vary significantly over follow-up (P = 0.77 by proportional-hazards testing).
  11. Report: per CONSORT 2025 item 26, with the numbers analysed and censored in each arm.

The one thing to remember

Patients lost to follow-up are censored at their last visit, not removed: the time they were seen alive still counts.

Worked examples use made-up numbers for teaching, calculated in Python. Confidence intervals for RR and OR use the log method. The chi-square test for the 2 × 2 table is without continuity correction. The Cox model uses the Breslow method. The standardisation, life table, attack rate, attributable fraction, matched-pair, Mantel-Haenszel and hazard-shape examples are also made up.

Sources: Cornfield J. J Natl Cancer Inst 1951;11:1269–75 (PMID 14861651). Levin ML. Acta Unio Int Contra Cancrum 1953;9:531–41 (PMID 13124110). Kaplan EL, Meier P. J Am Stat Assoc 1958;53:457–81 (doi:10.1080/01621459.1958.10501452). Mantel N, Haenszel W. J Natl Cancer Inst 1959;22:719–48 (PMID 13655060). Mantel N. Cancer Chemother Rep 1966;50:163–70 (PMID 5910392). Peto R, Peto J. J R Stat Soc Ser A 1972;135(2):185 (doi:10.2307/2344317). Cox DR. J R Stat Soc Ser B 1972;34:187–202 (doi:10.1111/j.2517-6161.1972.tb00899.x). Freeman J, Hutchison GB. Am J Epidemiol 1980;112:707–23 (doi:10.1093/oxfordjournals.aje.a113043). Laupacis A, Sackett DL, Roberts RS. N Engl J Med 1988;318:1728–33 (doi:10.1056/NEJM198806303182605). Cook RJ, Sackett DL. BMJ 1995;310:452–4 (doi:10.1136/bmj.310.6977.452). Egger M et al. BMJ 1997;315:629–34 (doi:10.1136/bmj.315.7109.629). Zhang J, Yu KF. JAMA 1998;280:1690–1 (doi:10.1001/jama.280.19.1690). Altman DG. BMJ 1998;317:1309–12 (doi:10.1136/bmj.317.7168.1309). Clark TG et al. Br J Cancer 2003;89:232–8 (doi:10.1038/sj.bjc.6601118). Pearce N. Environ Health Perspect 2004;112:1047–50 (doi:10.1289/ehp.6927). von Elm E et al. STROBE statement. Lancet 2007;370:1453–7 (doi:10.1016/S0140-6736(07)61602-X). Eisenhauer EA et al. RECIST 1.1. Eur J Cancer 2009;45:228–47 (doi:10.1016/j.ejca.2008.10.026). Goel MK, Khanna P, Kishore J. Int J Ayurveda Res 2010;1:274–8 (doi:10.4103/0974-7788.76794). Lundgren JD et al. (START). N Engl J Med 2015;373:795–807 (doi:10.1056/NEJMoa1506816). Kim MS, Prasad V. JAMA Netw Open 2019;2:e193981 (doi:10.1001/jamanetworkopen.2019.3981). Ferguson J et al. Eur J Epidemiol 2024;39:111–9 (doi:10.1007/s10654-023-01063-8). Hopewell S et al. CONSORT 2025 statement. BMJ 2025;389:e081123 (doi:10.1136/bmj-2024-081123).

Past papers

Every TNMGRMU question on risk and survival

Each one is answered in this chapter. Tap a sitting to open the university's own question paper.

  1. ×3Odds ratioDM Critical Care Medicine · Jan 2024MCh Gynaecological Oncology · Aug 2022MCh Gynaecological Oncology · Aug 2019
  2. ×3Survival analysisDM Neonatology · Aug 2023MD Community Medicine · Nov 2020MD Community Medicine · Oct 2018
  3. ×2Kaplan-meier curvesMCh Surgical Oncology · Aug 2025DM Cardiology · Aug 2022
  4. ×2Incidence and prevalencePh.D. RM · Jan 2018Ph.D. RM · Jul 2015
  5. ×2Kaplan Meir AnalysisPh.D. RM · Jan 2017Ph.D. RM · Jan 2014
  6. ×1NNT (number needed to treat)MCh Surgical Oncology · Aug 2025
  7. ×1Kaplan Meier curve and Funnel plotDM Neonatology · Jan 2024
  8. ×1Compare and Contrast Relative Risk and Hazards RatioMD Community Medicine · May 2023
  9. ×1Describe Kaplan-Meier and Water fall plotDM Medical Oncology · Feb 2023
  10. ×1Write a note on Odds Ratio and Confidence IntervalDM Neonatology · Aug 2022
  11. ×1Survival analysis and Kaplan Meier curveDM Neonatology · Nov 2020
  12. ×1How do you assess the Effectiveness of Anti-Retroviral Therapy for HIV Clinical trial using Kaplan - Meir Analysis?Ph.D. RM · Dec 2020
  13. ×1Compare and contrast ‘Risk’ presented as ‘Incidence’ in terms of person-years and ‘Hazard rate’ through survival analysisMD Community Medicine · Oct 2019
  14. ×1P Value and Odds ratioDM Cardiology · Feb 2019
  15. ×1Attributable riskMD Community Medicine · Oct 2018
  16. ×1Kaplan Meier AnalysisMCh Cardio Vascular and Thoracic Surgery · Aug 2015
  17. ×1Odds Ratio (OR)MD Community Medicine · Feb 2005
  18. ×1Aschoff nodule Answer ALL the questions. Essay: (9)Kaplan-Meier modelMCh Cardio Vascular and Thoracic Surgery · Apr 2004
  19. ×1Methods of survival analysisMD Community Medicine

Further reading

Related Stateazy articles