Skip to content
Scintria
ToolsGrant writerFunding
HomeLiteratureClinical trialsEvidence LabProtocol packData analysisLearnProjectsLibraryReferencesApplications
Start free
ScintriaStart free

Learn / Biostatistics / Analysing categorical data

Risk, odds and the measures of association

15 minute read · 6-question quiz

Download this lesson as a colour Word or PDF study guide with the figures and answers. Included in paid plans; reading and quizzes stay free.Sign in

What you will learn

  • Calculate risk, risk difference, risk ratio, odds and odds ratio from a two-by-two table

  • Interpret each measure and know when each is appropriate

  • Compute and use number needed to treat or harm

When both exposure (or treatment) and outcome are yes/no, all the data fit in a two-by-two table. Everything in this chapter flows from four counts: a, b, c and d.

Cohort of 500 childrenOutcomeNo outcomeExposeda = 40b = 160Not exposedc = 20d = 280Risk (exposed) = 40/200 = 20%Risk (unexposed) = 20/300 = 6.7%RR = 3.0OR = (40×280)/(160×20) = 3.5
A cohort of 500 children: 200 from smoky kitchens, 300 from smoke-free kitchens, followed for a year.

The measures

Risk (cumulative incidence) is the proportion who develop the outcome: exposed 40/200 = 0.20; unexposed 20/300 = 0.067.

Odds is the number with the outcome divided by the number without: exposed 40/160 = 0.25; unexposed 20/280 = 0.0714. When the outcome is rare, odds and risk are almost equal; when it is common they diverge markedly.

The comparisons

Risk difference (RD) = 0.200 − 0.067 = 0.133 (13.3 extra cases per 100 children).

Risk ratio (RR) = 0.200 / 0.067 = 3.0: exposed children have three times the risk.

Odds ratio (OR) = (ad)/(bc) = (40 × 280)/(160 × 20) = 3.5.

Number needed to harm (NNH) = 1 / RD = 1 / 0.133 = 7.5: for about every 8 exposed children, one extra case occurs.

Confidence intervals

Ratios are skewed, so intervals are built on the log scale and then exponentiated:

SE(ln RR) = sqrt((1)/(a) - (1)/(a+b) + (1)/(c) - (1)/(c+d)), SE(ln OR) = sqrt(\frac1a + \frac1b + \frac1c + \frac1d)

For the RR: SE = sqrt(0.025 - 0.005 + 0.05 - 0.0033) = 0.258. Then exp(ln 3.0 ± 1.96 × 0.258) gives RR 3.0 (95% CI 1.8 to 5.0). For the OR: SE = 0.291, giving OR 3.5 (95% CI 2.0 to 6.2). The null value for a ratio is 1 (no association); for a difference it is 0.

StudyEstimate (95% CI)Risk ratio3 (1.8–5)Odds ratio3.5 (2–6.2)1245Ratio (log scale); 1 = no association
Both ratios are well above 1; the OR is further from 1 than the RR because the outcome is not rare (20% in the exposed).

Which measure for which study?

Study designCan you estimate risk?Measure
Randomised trial, cohortYesRisk ratio, risk difference, NNT; odds ratio from logistic regression
Case-controlNo (you chose the numbers of cases and controls)Odds ratio only
Cross-sectional surveyPrevalencePrevalence ratio or odds ratio

Odds ratios are not risk ratios

When an outcome is common, the OR exaggerates the RR. In a trial where 40% of controls and 20% of treated die, RR = 0.50 but OR = 0.38. Reporting 'a 62% reduction in the odds' sounds far better than 'a halving of the risk' but misleads readers who read odds as risk. Always say 'odds'. For a cohort or trial, report the risk ratio or risk difference as well.

Relative versus absolute

A drug that cuts risk from 2 in 1,000 to 1 in 1,000 has a relative risk reduction of 50% and an absolute risk reduction of 0.1 percentage points (NNT = 1,000). Headlines use the relative figure; clinicians and funders need the absolute one. Report both.

Cross-check with the rare-disease rule

In a case-control study of 100 children with cerebral malaria and 200 controls, 60 cases and 80 controls slept without a bed net. Exposure odds in cases 60/40 = 1.5; in controls 80/120 = 0.667. OR = 1.5/0.667 = 2.25. Because cerebral malaria is rare in the population, this OR is a good estimate of the RR.

Summary

  • Risk is a proportion; odds is events ÷ non-events.

  • RR = ratio of risks; OR = ad/bc; RD = difference; NNT = 1/|RD|.

  • Case-control studies give odds ratios only; cohorts and trials can give risks.

  • ORs exaggerate RRs when the outcome is common.

  • Report absolute as well as relative effects, each with a CI.

Check your understanding

Question 1
1

In a trial, 15/100 treated and 30/100 control patients die. What is the risk ratio?

Question 2
2

In the same trial, what is the NNT?

Question 3
3

A case-control study can directly estimate:

Question 4
4

An OR of 1.0 means:

Question 5
5

When the outcome is common, compared with the RR the OR is usually:

Question 6
6

Which statement about a 95% CI for a RR of 1.4 (0.9 to 2.2) is right?

Draft study guide. Spotted an error or something unclear? Tell us at hello@scintria.com. This is educational material, not clinical or regulatory advice.

Rank tests, multiple comparisons and the misuse of p-valuesChi-square and Fisher's exact tests