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.
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
| Feature | Incidence | Prevalence |
|---|---|---|
| Counts | New cases only | All existing cases, old and new |
| Denominator | People at risk, or person-time at risk | Whole population at that time |
| Time | Over a period | At a point, or over a period |
| Usual design | Cohort study, register of new diagnoses | Cross-sectional survey |
| Used for | Causes and risk factors, effect of prevention | Burden of disease, planning beds and services |
| Affected by how long the disease lasts | No | Yes: 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.
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.
- 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.
- 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.
More new cases → higher prevalence
Each case lasts longer → higher prevalence
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.
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 people | Town A deaths per 1,000 | Town B people | Town B deaths per 1,000 | Standard population |
|---|---|---|---|---|---|
| 0–29 | 20,000 | 0.5 | 50,000 | 1.0 | 40,000 |
| 30–59 | 50,000 | 3.0 | 40,000 | 4.0 | 40,000 |
| 60+ | 30,000 | 30.0 | 10,000 | 40.0 | 20,000 |
| All ages | 100,000 | crude 10.6 | 100,000 | crude 6.1 | 100,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.
| Feature | Direct standardisation | Indirect standardisation |
|---|---|---|
| Needs | Age-specific rates in each study population, and a standard population | Total deaths and the age structure of the study population, and reference age-specific rates |
| Result | Age-standardised rate, for example per 1,000 | Standardised mortality ratio: observed ÷ expected |
| Use when | Each age group has enough deaths for a stable rate | Age groups are small, or deaths by age are not known |
| Comparing populations | Standardised rates can be compared with each other | Each SMR compares one population with the reference |
| Teaching example | Town A 7.4, town B 10.0 per 1,000 | Town 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.
The rest of town B is split 5 to 4 between ages 0–29 and 30–59.
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 (years) | Town A people | Town A rate | Town B people | Town B rate | Standard population |
|---|---|---|---|---|---|
| 0–29 | 20,000 | 0.5 | 50,000 | 1.0 | 40,000 |
| 30–59 | 50,000 | 3.0 | 40,000 | 4.0 | 40,000 |
| 60+ | 30,000 | 30.0 | 10,000 | 40.0 | 20,000 |
| All ages | 100,000 | crude 10.6 | 100,000 | crude 6.1 | 100,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) | q | l | Deaths | L | T | e (years) |
|---|---|---|---|---|---|---|
| 0–19 | 0.05 | 100,000 | 5,000 | 1,950,000 | 7,148,115 | 71.5 |
| 20–39 | 0.03 | 95,000 | 2,850 | 1,871,500 | 5,198,115 | 54.7 |
| 40–59 | 0.10 | 92,150 | 9,215 | 1,750,850 | 3,326,615 | 36.1 |
| 60–79 | 0.40 | 82,935 | 33,174 | 1,326,960 | 1,575,765 | 19.0 |
| 80+ | 1.00 | 49,761 | 49,761 | 248,805 | 248,805 | 5.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.
| DVT | No DVT | Total | Risk | |
|---|---|---|---|---|
| Prophylaxis | a = 30 | b = 170 | 200 | 30 ÷ 200 = 15% |
| No prophylaxis | c = 50 | d = 150 | 200 | 50 ÷ 200 = 25% |
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.
| Feature | Relative measures | Absolute measures |
|---|---|---|
| Examples | RR, RRR, OR, HR | ARR (risk difference), NNT |
| Change with baseline risk | Usually similar across baseline risks | Smaller ARR and larger NNT when baseline risk is low |
| Tells a patient | By what proportion the risk falls | How many events are prevented per 100 treated |
| Can mislead when | Baseline risk is low: a small benefit looks large | Populations with different baseline risks are compared |
| In a trial report | Give both | Give 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).
| Exposed | RR | PAF | Cases per 100,000 (risk 1% if unexposed) | Cases if nobody were exposed |
|---|---|---|---|---|
| 20% | 3.0 | 28.6% | 1,400 | 1,000 |
| 2% | 10.0 | 15.3% | 1,180 | 1,000 |
| 50% | 1.5 | 20.0% | 1,250 | 1,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
| Feature | Relative risk (RR) | Odds ratio (OR) |
|---|---|---|
| Compares | Risks: events ÷ everyone in the group | Odds: events ÷ people without the event |
| Designs | Cohort studies and trials | Case-control studies, and logistic regression in any design |
| No difference | 1 | 1 |
| Rare outcome (3 vs 5 per 1,000) | RR 0.60 | OR 0.599: almost the same |
| Common outcome (15% vs 25%) | RR 0.60 | OR 0.53: further from 1 than the RR |
| Easy to explain to patients | Yes | Less 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.
Risk with prophylaxis: 15.0%
Risk without prophylaxis (baseline risk): 25.0%
| Measure | Working | Result |
|---|---|---|
| Risk with prophylaxis | 30 ÷ 200 | 15.0% |
| Risk without prophylaxis | 50 ÷ 200 | 25.0% |
| Relative risk (RR) | 0.150 ÷ 0.250 | 0.60 |
| Relative risk reduction (RRR) | 1 − 0.60 | 40.0% |
| Absolute risk reduction (ARR) | 0.250 − 0.150 | 0.100 (10.0 percentage points) |
| Number needed to treat (NNT) | 1 ÷ 0.100 | 10 |
| 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.
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.
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.
| Pairs | Control exposed | Control not exposed |
|---|---|---|
| Case exposed | 30 (both exposed) | 40 (only the case exposed) |
| Case not exposed | 16 (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.
| Stratum | Exposed cases (a) | Exposed controls (b) | Unexposed cases (c) | Unexposed controls (d) | n | OR |
|---|---|---|---|---|---|---|
| Younger | 10 | 90 | 20 | 380 | 500 | 2.11 |
| Older | 90 | 210 | 30 | 170 | 500 | 2.43 |
| Both ages combined | 100 | 300 | 50 | 550 | 1,000 | 3.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.
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+.
| Month | At risk (n) | Deaths (d) | (n − d) ÷ n | S(t) |
|---|---|---|---|---|
| 1 | 15 | 1 | 14/15 | 0.933 |
| 2 | 14 | 1 | 13/14 | 0.867 |
| 4 | 12 | 1 | 11/12 | 0.794 |
| 5 | 11 | 1 | 10/11 | 0.722 |
| 7 | 10 | 1 | 9/10 | 0.650 |
| 8 | 9 | 1 | 8/9 | 0.578 |
| 10 | 7 | 1 | 6/7 | 0.495 |
| 12 | 6 | 1 | 5/6 | 0.413 |
| 14 | 5 | 1 | 4/5 | 0.330 |
| 18 | 3 | 1 | 2/3 | 0.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.
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.
10 deaths and 5 censored patients.
| Month | At risk (n) | Deaths (d) | (n − d) ÷ n | S(t) |
|---|---|---|---|---|
| 1 | 15 | 1 | 14/15 | 0.933 |
| 2 | 14 | 1 | 13/14 | 0.867 |
| 4 | 12 | 1 | 11/12 | 0.794 |
| 5 | 11 | 1 | 10/11 | 0.722 |
| 7 | 10 | 1 | 9/10 | 0.650 |
| 8 | 9 | 1 | 8/9 | 0.578 |
| 10 | 7 | 1 | 6/7 | 0.495 |
| 12 | 6 | 1 | 5/6 | 0.413 |
| 14 | 5 | 1 | 4/5 | 0.330 |
| 18 | 3 | 1 | 2/3 | 0.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:
| Months | n | d | c | n − c/2 | q | S at the end | Kaplan-Meier at the same time |
|---|---|---|---|---|---|---|---|
| 0–6 | 15 | 4 | 1 | 14.5 | 0.276 | 0.724 | 0.722 |
| 6–12 | 10 | 3 | 1 | 9.5 | 0.316 | 0.495 | 0.495 |
| 12–18 | 6 | 2 | 1 | 5.5 | 0.364 | 0.315 | 0.330 |
| 18–24 | 3 | 1 | 2 | 2.0 | 0.500 | 0.158 | 0.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.
| Feature | Actuarial life table | Kaplan-Meier |
|---|---|---|
| Time | Fixed intervals | Each exact event time |
| Censored patients | At risk for half the interval | At risk until their exact censoring time |
| Curve | Changes at the end of each interval | Drops at each death |
| Suits | Large numbers, or events known only to an interval | Exact event times, in small or large studies |
| Teaching data at 24 months | 0.158 | 0.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.
| Group | Observed deaths (O) | Expected deaths (E) | O − E |
|---|---|---|---|
| Standard | 10 | 5.70 | +4.30 |
| New drug | 7 | 11.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.
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).
| Feature | Relative risk | Hazard ratio |
|---|---|---|
| Compares | Proportion with the event by the end of follow-up | Event rate at each moment among those still at risk |
| Uses the timing of events | No | Yes |
| Handles censoring and unequal follow-up | No: needs complete follow-up for a fixed period | Yes |
| Usual method | 2 × 2 table | Cox proportional hazards regression |
| Main assumption | Everyone followed for the same period | Hazard ratio constant over time |
| In the teaching trial | 0.70 | 0.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.
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.
A case-control study of risk factors for anastomotic leak compares patients who leaked with patients who did not.
Report odds ratios. Leak risk cannot be calculated, because you chose how many patients without a leak to include.
A phase III trial shows overall survival as Kaplan-Meier curves. A phase II study shows tumour shrinkage as a waterfall plot.
For survival, read the median, the hazard ratio with its CI and the numbers at risk. A waterfall plot shows each patient's best tumour response, not survival.
Time to the first major adverse cardiac event, with patients joining the study over two years and followed until a common closing date.
Follow-up differs between patients, so use Kaplan-Meier and Cox methods, not the percentage of patients with an event.
Time to full enteral feeding in preterm babies. Some babies are transferred to another hospital before they reach full feeds.
Censor a transferred baby on the date of transfer. Do not remove the baby from the analysis.
A case-control study of maternal smoking and stillbirth. Stillbirth is uncommon.
With a rare outcome the odds ratio is close to the relative risk. State that it is an odds ratio.
A district survey measures the prevalence of a chronic infection. Notification data give the number of new cases each year.
In a steady state, prevalence ≈ incidence × duration. Earlier diagnosis and cure shorten duration and lower prevalence even before incidence falls.
A trial of an antiemetic reports the percentage of patients with PONV in each group.
Give the RR and the absolute risk reduction with their CIs, and the NNT for the period studied, such as the first 24 hours.
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
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.
A wrong survival figure in your thesis
Removing patients lost to follow-up, as in the opening case, underestimates survival.
A common viva error
Reporting "risk" or "relative risk" from a case-control study.
Misreading papers
The same 40% relative reduction means 10 fewer events per 100 patients at 25% baseline risk, and only 2 fewer at 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
- 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.
- 1953
Levin
Introduced a method of estimating the population attributable fraction from the prevalence of a risk factor and its relative risk.
- 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.
- 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.
- 1966
Mantel
Applied the combination of 2 × 2 tables, one at each death time, to the comparison of survival data.
- 1972
Richard Peto and Julian Peto
Described the logrank test as particularly appropriate for comparing life tables, including in clinical trials.
- 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.
- 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.
- 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.
- 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.
- 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
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”.
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”.
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”.
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
- Define time zero (randomisation, diagnosis or surgery) and the event (death from any cause, relapse).
- For each patient, record the time from time zero to the event or to censoring, and whether the event happened.
- Sort the times. At each event time, count the patients at risk and the events.
- Calculate (n − d) ÷ n at each event time and multiply in order to get S(t).
- Draw a step curve for each group with censoring ticks and the numbers at risk below the time axis.
- Read the median survival and the survival at fixed times, such as 1 year, with 95% CIs.
- Compare the groups with the log-rank test.
- Estimate the size of the difference with a hazard ratio from Cox regression, and check that the hazards are proportional.
- 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”
A danger, or the chance that something bad happens.
The proportion of a group that develops the outcome over a stated period. It can refer to a good outcome too.
“Censored”
Cut or banned by an official.
Follow-up ended before the event was seen. The patient's time up to that point is still used.
“Survival”
Staying alive.
Time until any defined event: death, relapse, discharge or full feeds.
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- 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.
- Odds: events ÷ non-events. Risk: events ÷ total.
- Interpretation: OR = 1, no association. OR above 1, exposure linked with higher odds. OR below 1, lower odds (protective).
- 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.
- 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.
- 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.
- 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.
- 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.
- 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).
- 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| Measure | Formula | Teaching example | Meaning |
|---|---|---|---|
| Relative risk | Ie ÷ Iu | 25% ÷ 15% = 1.67 | Strength of association |
| Attributable risk (risk difference) | Ie − Iu | 25 − 15 = 10 per 100 | Cases among the exposed that are due to the exposure |
| Attributable risk percent | (Ie − Iu) ÷ Ie × 100 | 10 ÷ 25 = 40% | Share of the exposed group's risk due to the exposure |
| Population attributable risk | It − Iu | needs 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 fraction | p(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 reduction | CER − EER | 25% − 15% = 10 points | Events prevented per 100 treated |
| Relative risk reduction | ARR ÷ CER | 10 ÷ 25 = 40% | Proportion of the control risk removed |
| NNT | 1 ÷ ARR | 1 ÷ 0.10 = 10 | Patients 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- 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.
- Prevalence: all existing cases, old and new. Point prevalence at one time. Period prevalence over an interval.
- Sources: incidence from cohort studies and registers of new diagnoses. Prevalence from cross-sectional surveys.
- 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%.
- Prevalence rises with: more new cases, longer duration, treatment that prolongs life without cure, arrival of cases or better detection.
- Prevalence falls with: fewer new cases, faster cure, higher case fatality, departure of cases.
- Uses: incidence for causes, risk factors and the effect of prevention. Prevalence for disease burden and planning services.
- 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%).
- Incidence from prevalence: incidence ≈ prevalence ÷ average duration (4 per 1,000 ÷ 0.25 years ≈ 16 per 1,000 person-years).
- 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| Feature | Risk (cumulative incidence) and RR | Incidence rate (person-years) and rate ratio | Hazard rate and hazard ratio |
|---|---|---|---|
| Numerator | New cases | New cases | Events at a moment |
| Denominator | People at risk at the start | Total person-time at risk | People still at risk at that moment |
| Units | None (a proportion over a stated period) | Per person-time, e.g. per 1,000 person-years | Per unit time |
| Unequal follow-up and censoring | Not handled | Handled through person-time | Handled |
| Uses the timing of events | No | No (one average rate) | Yes |
| Assumption | Complete follow-up for the period | Constant rate over the period | Hazard ratio constant over time (Cox model) |
| Method | 2 × 2 table | Events ÷ person-time, Poisson methods | Kaplan-Meier, log-rank, Cox regression |
| Teaching trial | 7/15 vs 10/15, RR 0.70 | 2.55 vs 6.45 per 100 person-months, ratio 0.40 | HR 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- Definition: analysis of the time from a defined starting point to an event (death, relapse, discharge).
- Why special methods: follow-up differs between patients, some are censored, and survival times are usually skewed.
- Key terms: survival time, censoring (right-censoring is the usual type), survival function S(t), hazard, median survival.
- Describing survival: life table (actuarial) method with fixed intervals, and the Kaplan-Meier (product-limit) method using exact event times.
- 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).
- 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.
- Shape of the hazard: constant (exponential), rising or falling (Weibull). Cox regression assumes no shape, only proportional hazards.
- Comparing groups: log-rank test.
- Adjusting for other variables: Cox proportional hazards regression, giving hazard ratios. Parametric models (exponential, Weibull) assume a shape for the hazard.
- Reported as: median survival, survival at fixed times (1-year, 5-year), hazard ratio with 95% CI, numbers at risk.
- Assumptions: censoring unrelated to prognosis, similar survival for patients recruited early and late, and proportional hazards for log-rank and Cox.
- 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- Origin: Kaplan and Meier, Journal of the American Statistical Association, 1958. Also called the product-limit estimate.
- Principle: survival to time t is the product of the fractions surviving each event time: S(t) = S(previous) × (n − d) ÷ n.
- Censored patients count in the number at risk until they are censored, then leave the denominator without a drop in the curve.
- 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.
- The curve: a step function, y-axis proportion surviving, x-axis time. Ticks mark censoring. Numbers at risk under the axis.
- 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).
- Comparing curves: log-rank test (example χ² 4.87, P 0.027). Size of effect: hazard ratio from Cox regression (example HR 0.33).
- 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.
- Assumptions: non-informative censoring, similar survival prospects for early and late recruits, event time known.
- 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 2023Kaplan-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- Design: randomised controlled trial, for example immediate versus deferred ART, or a new regimen versus standard ART. Define eligibility and randomise.
- Time zero: the date of randomisation.
- 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.
- 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.
- 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).
- 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.
- Summaries: median time to the event (or "not reached") and the event-free proportion at 1, 2 and 3 years with 95% CIs.
- Compare arms: log-rank test. Null hypothesis: the survival curves are the same.
- 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.
- 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).
- 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.
- ×3Odds ratio
- ×3Survival analysis
- ×2Kaplan-meier curves
- ×2Incidence and prevalence
- ×2Kaplan Meir Analysis
- ×1NNT (number needed to treat)
- ×1Kaplan Meier curve and Funnel plot
- ×1Compare and Contrast Relative Risk and Hazards Ratio
- ×1Describe Kaplan-Meier and Water fall plot
- ×1Write a note on Odds Ratio and Confidence Interval
- ×1Survival analysis and Kaplan Meier curve
- ×1How do you assess the Effectiveness of Anti-Retroviral Therapy for HIV Clinical trial using Kaplan - Meir Analysis?
- ×1Compare and contrast ‘Risk’ presented as ‘Incidence’ in terms of person-years and ‘Hazard rate’ through survival analysis
- ×1P Value and Odds ratio
- ×1Attributable risk
- ×1Kaplan Meier Analysis
- ×1Odds Ratio (OR)
- ×1Aschoff nodule Answer ALL the questions. Essay: (9)Kaplan-Meier model
- ×1Methods of survival analysis
Further reading