Learn / Biostatistics / Analysing categorical data
Risk, odds and the measures of association
15 minute read · 6-question quiz
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.
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.
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.
Which measure for which study?
| Study design | Can you estimate risk? | Measure |
| Randomised trial, cohort | Yes | Risk ratio, risk difference, NNT; odds ratio from logistic regression |
| Case-control | No (you chose the numbers of cases and controls) | Odds ratio only |
| Cross-sectional survey | Prevalence | Prevalence ratio or odds ratio |
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
Draft study guide. Spotted an error or something unclear? Tell us at hello@scintria.com. This is educational material, not clinical or regulatory advice.