Unit 07.03: Risk is out of everyone; odds is against the alternative
Risk ratios and odds ratios agree only when the outcome is rare, and the odds ratio is the one your model will hand you.
Risk is out of everyone; odds is against the alternative
Risk is events divided by the total. A risk ratio compares two risks and reads naturally: twice as likely.
Odds is events divided by non-events. An odds ratio compares two odds, and it does not read naturally at all โ but it is what logistic regression produces, so you will meet it constantly.
The two are close when the outcome is rare, because with few events the denominator of the odds is nearly the total. As the outcome becomes common they diverge sharply, and the odds ratio is always further from 1 โ so reading one as a risk ratio always overstates the effect.
This block computes both from one table, then repeats with a common outcome.
import numpy as np
table = np.array([[30, 270], # exposed: event, no event
[15, 285]]) # unexposed: event, no event
risk = table[:, 0] / table.sum(axis=1)
odds = table[:, 0] / table[:, 1]
rr, or_ = risk[0] / risk[1], odds[0] / odds[1]
print(" event no_event")
for name, row in zip(["exposed", "unexposed"], table):
print(f"{name:11s}{row[0]:6d}{row[1]:10d}")
print()
print(f"Risk exposed : {risk[0]:.4f}")
print(f"Risk unexposed : {risk[1]:.4f}")
print(f"Risk ratio : {rr:.3f}")
print(f"Odds ratio : {or_:.3f}")
print(f"\nThe odds ratio exaggerates the risk ratio by {or_ / rr:.2f}x here,")
print(f"because the outcome is rare ({risk.mean():.1%} overall).\n")
common = np.array([[300, 200], [200, 300]])
c_risk = common[:, 0] / common.sum(axis=1)
c_odds = common[:, 0] / common[:, 1]
c_rr, c_or = c_risk[0] / c_risk[1], c_odds[0] / c_odds[1]
print(f"With a common outcome ({c_risk.mean():.0%}):")
print(f" risk ratio {c_rr:.2f} odds ratio {c_or:.2f}"
f" -- a factor of {c_or / c_rr:.2f} apart")
print("\nReport risk ratios where you can. Logistic regression gives you odds")
print("ratios, and they are routinely misread as risk ratios.")
With risks of 0.1000 and 0.0500 the risk ratio is exactly 2.000 and the odds ratio 2.111 โ close, because the outcome is rare at 7.5% overall, and the odds ratio exaggerates by a factor of 1.06. With a common outcome (50%) the same calculation gives a risk ratio of 1.50 against an odds ratio of 2.25, a factor of 1.50 apart. The same data, described as 'half again as likely' or 'more than twice the odds'.
The mistake this prevents
The mistake is saying 'twice as likely' when the model reported an odds ratio of 2. With a common outcome that overstates the risk ratio substantially.
Takeaway
Report risk ratios or absolute risks where you can. When reporting an odds ratio, say that it is an odds ratio and give the underlying rates so a reader can convert.
