Relative risk and odds ratio
Relative Risk, Odds Ratio, Attributable Risk, NNT and NNH: Worked Calculations
How to calculate relative risk, odds ratio, attributable risk, ARR, RRR, NNT and NNH from a 2 × 2 table, with worked FCPS-style examples. Also shows which measure belongs to which study design and how to read confidence intervals.
The 2 × 2 table
- Every measure of association comes from one table. Put exposure in rows and disease in columns, and keep that layout every time to avoid mistakes.
| Disease present | Disease absent | Total | |
|---|---|---|---|
| Exposed | a | b | a + b |
| Unexposed | c | d | c + d |
- Risk (incidence) in exposed Ie = a/(a + b); risk in unexposed Iu = c/(c + d).
- Odds are different from risk: odds of disease in exposed = a/b (those with disease divided by those without), not a/(a + b). When disease is rare, b is close to a + b, so odds and risk are almost equal.
Ratio measures: strength of association
| Measure | Formula | Design | Meaning |
|---|---|---|---|
| Relative risk (risk ratio) | Ie ÷ Iu | Cohort, RCT | How many times more likely the exposed are to get the disease |
| Odds ratio | (a × d) ÷ (b × c) | Case-control (also cross-sectional, logistic regression) | Approximates RR when the disease is rare (under about 10%) |
| Rate ratio | Incidence rate ÷ incidence rate (per person-time) | Cohort with varying follow-up | As RR |
| Hazard ratio | Ratio of instantaneous event rates | Survival analysis (Cox) | As RR over time |
- Ratio of 1 means no association; above 1 increased risk; below 1 protective.
- A case-control study cannot give RR, because the investigator fixed the numbers of cases and controls, so a/(a + b) is not a real incidence. The odds ratio is unaffected by that choice.
Exam trap Never calculate relative risk from a case-control study; use the odds ratio.
Difference measures: impact of exposure
| Measure | Formula | Meaning |
|---|---|---|
| Attributable risk (risk difference) | Ie − Iu | Extra cases in the exposed caused by the exposure |
| Attributable risk percent (aetiological fraction) | (Ie − Iu) ÷ Ie × 100, or (RR − 1) ÷ RR × 100 | Share of disease among the exposed that is due to the exposure |
| Population attributable risk | Ip − Iu (Ip = incidence in whole population) | Extra cases in the whole population due to the exposure |
| Population attributable fraction | (Ip − Iu) ÷ Ip | Share of all cases that would vanish if exposure were removed; sets public health priorities |
- Relative risk tells you about causation (strength); attributable risk tells you about public health benefit (how many cases you could prevent). A common exposure with a modest RR can cause more cases than a rare one with a high RR.
Worked examples: cohort data
- Smokers and disease: 30 per 1,000 smokers and 10 per 1,000 non-smokers develop the disease.
- RR = 30/1,000 ÷ 10/1,000 = 3 (smokers are three times as likely).
- Attributable risk = 30 − 10 = 20 per 1,000 (20 extra cases per 1,000 smokers are due to smoking).
- Attributable risk percent = 20 ÷ 30 = 67% of the disease in smokers is due to smoking.
- Working women and low birth weight: 40 of 100 working women and 21 of 110 housewives have low birth weight babies.
- Ie = 40/100 = 0.40; Iu = 21/110 = 0.19; RR = 0.40 ÷ 0.19 = about 2.1.
Treatment effect measures in trials
- Control event rate (CER) = events ÷ total in control group; experimental event rate (EER) = events ÷ total in treated group.
| Measure | Formula |
|---|---|
| Relative risk | EER ÷ CER |
| Relative risk reduction (RRR) | (CER − EER) ÷ CER = 1 − RR |
| Absolute risk reduction (ARR) | CER − EER |
| Number needed to treat (NNT) | 1 ÷ ARR, rounded up |
| Absolute risk increase (ARI) | Harm rate on drug − harm rate on control |
| Number needed to harm (NNH) | 1 ÷ ARI |
- Use proportions, not percentages, in the division (4% = 0.04).
- NNT example: heart attacks in 20% of controls and 15% of treated over 5 years. ARR = 0.20 − 0.15 = 0.05; NNT = 1 ÷ 0.05 = 20: treat 20 people for 5 years to prevent one heart attack. RRR = 0.05 ÷ 0.20 = 25%.
- Mortality example: 10% control, 6% treated. ARR = 0.04, RRR = 40%, NNT = 25.
- NNH example: serious rash in 3% on drug and 1% on placebo. ARI = 0.03 − 0.01 = 0.02; NNH = 1 ÷ 0.02 = 50: one extra rash for every 50 people treated.
- An NNT is meaningless without its time period and outcome. Smaller NNT means a more effective treatment; larger NNH means a safer one.
- RRR stays fairly constant across patients, but ARR and NNT depend on baseline risk: the same drug gives a smaller NNT in high-risk patients. Promotional material quotes RRR because it sounds bigger than ARR.
Remember NNT = 1 ÷ ARR; NNH = 1 ÷ ARI; always state the time period.
Confidence intervals and significance
- For ratios (RR, OR, HR), a 95% CI that includes 1 means the result is not statistically significant.
- For differences (ARR, attributable risk, mean difference), a CI that includes 0 is not significant.
- A narrow CI means a precise estimate, usually from a large sample. Example: RR 1.8 (95% CI 1.2 to 2.7) is significant; RR 1.8 (0.9 to 3.6) is not.
Other measures
- Standardised mortality ratio = observed ÷ expected deaths × 100 (indirect standardisation); over 100 means excess deaths.
- Prevalence ratio or prevalence odds ratio in cross-sectional studies.
- Vaccine efficacy = (attack rate unvaccinated − attack rate vaccinated) ÷ attack rate unvaccinated = 1 − RR.
- A dose–response gradient in RR across exposure levels strengthens causal inference.
| Design | Main measure |
|---|---|
| Cohort | RR, attributable risk, incidence |
| Case-control | Odds ratio |
| Cross-sectional | Prevalence, prevalence ratio or odds ratio |
| RCT | RR, ARR, RRR, NNT |
| Survival study | Hazard ratio |
How FCPS asks about this
- RR and AR when 30/1,000 smokers and 10/1,000 non-smokers are affected: RR 3; attributable risk 20 per 1,000.
- Measure used in case-control studies: odds ratio (ad/bc); approximates RR when disease is rare.
- NNT when events fall from 20% to 15% over 5 years: 20, for 5 years of treatment.
- NNH when a rash occurs in 3% on drug and 1% on placebo: 50.
- Proportion of all cases preventable by removing an exposure: population attributable fraction.
- Confidence interval for RR crossing 1: not statistically significant.
- RR for low birth weight in 40/100 working women versus 21/110 housewives: about 2.1.
Test yourself on this topic
2 of the 2 questions in our bank on this topic. Choose an answer to see why every option is right or wrong.
Of 20 neonates with tetanus, 19 mothers had not received tetanus toxoid. Of 40 neonates without tetanus, 30 mothers had received two doses. What is the odds ratio of tetanus for unvaccinated mothers?
Answer: 57
Cases: 19 unvaccinated, 1 vaccinated. Controls: 10 unvaccinated, 30 vaccinated. OR = (19 x 30) / (1 x 10) = 57, so tetanus is far more likely when the mother is unvaccinated.
Odds ratio
- OR = ad / bc from the 2x2 table
- Cases: 19 exposed, 1 unexposed
- Controls: 10 exposed, 30 unexposed
- OR 57, a strong risk factor
Remember With exposure defined as no vaccination, OR = (19 x 30) / (1 x 10) = 57.
Why the other options are wrong
- 5.7 Decimal slip; cross-product 570 divided by 10 gives 57, not 5.7.
- 0.0175 Inverse (about 1/57), the odds ratio if vaccination were taken as the exposure.
- 0.57 Wrong cross-multiplication; ignores the 30 vaccinated controls properly.
- 19 Number of unvaccinated mothers among cases; not an odds ratio.
Which measure of association is calculated in a case-control study?
Answer: Odds ratio
A case-control study starts with outcome status, so incidence cannot be measured and relative risk cannot be calculated directly. The odds of exposure in cases against controls give the odds ratio.
Relative risk and odds ratio
- Starts from outcome
- Measure: odds ratio
- Cohort gives relative risk
Remember Case-control studies yield the odds ratio.
Why the other options are wrong
- Hazard ratio Used in survival analysis of follow-up data.
- Attributable risk Derived from cohort data as the difference in risk.
- Relative risk Calculated in cohort studies and trials where incidence is known.
- Incidence rate Needs follow-up of a population, not available in case-control studies.
Where this sits in the CPSP syllabus
- Paper 1: Epidemiology, Measures of association and impact: RR, OR, attributable risk, NNT