Odds ratio and relative risk
Odds ratios and relative risks both compare how often an outcome occurs in two groups. They’re often confused, and the difference matters most exactly when outcomes are common.
The 2×2 table
| Outcome yes | Outcome no | |
|---|---|---|
| Group A | a | b |
| Group B | c | d |
- Relative risk = [a / (a + b)] / [c / (c + d)]
- Odds ratio = (a / b) / (c / d) = ad / bc
Worked example
In R’s mtcars data, what share of manual and automatic cars have a straight (rather than V-shaped) engine?
| Straight engine | V engine | Total | |
|---|---|---|---|
| Manual | 7 | 6 | 13 |
| Automatic | 7 | 12 | 19 |
- Risk (proportion) of a straight engine: manual 7/13 = .54, automatic 7/19 = .37.
- RR = .54 / .37 ≈ 1.46: manual cars are about 1.5 times as likely to have a straight engine.
- Odds: manual 7/6 = 1.17, automatic 7/12 = 0.58. OR = 1.17 / 0.58 = 2.00.
The OR (2.00) is noticeably larger than the RR (1.46), because the outcome is common. Saying manual cars are “twice as likely” to have a straight engine would overstate the difference. They have twice the odds.
Inference matters too. Analytika’s Fisher’s exact test on this table gives a conditional odds ratio of 1.96, 95% CI [0.38, 10.59], p = .473: no evidence of an association, with an interval consistent with anything from a strong negative to a strong positive effect. (Exact methods estimate the OR slightly differently from the simple ad / bc formula, hence 1.96 rather than 2.00.)
When the OR approximates the RR
When the outcome is rare (say under 10% in both groups), odds and probabilities are almost the same, so OR ≈ RR. As outcomes become more common, the OR moves further from 1 than the RR.
Which to report
- Randomised trials and cohort studies: RR (or risk difference) is more intuitive.
- Case-control studies: only the OR is valid, because the proportion of cases is set by the design.
- Logistic regression: produces ORs. Describe them as changes in odds, not probability. See logistic regression.
Reporting
Always give a confidence interval, and treat an interval that includes 1 as no evidence of an association: OR = 1.96, 95% CI [0.38, 10.59], p = .473. See also Fisher’s exact test and Cramér’s V.
More in Categorical data
Try it with the free tools
Run this on your own data
Upload a dataset and ask your question in plain English. Analytika checks the assumptions, picks the test, runs it, and writes the results up in APA format.