Odds ratio and risk ratio from a 2×2 table
From independent binary counts, estimate the risk ratio from risks and the odds ratio from odds, with a separate log interval for each.
Fit
When to use it, and when not to
Use it when
- You compare two independent groups on the same binary outcome over the same follow-up period.
- You want crude association measures from a complete 2×2 table.
Not when
- The observations are paired or matched. Use a matched analysis, such as conditional logistic regression. Read: Conditional logistic regression for matched case-control data
- You need covariate adjustment for an odds ratio. Use logistic regression with a model-based interval. Read: Logistic regression
- You need an adjusted risk ratio. Consider modified Poisson regression with robust variance. Read: Zero-inflated Poisson regression
Before you start
What you need
- Four counts and reference groupLabel events and non-events for each group. Reversing the group contrast inverts both ratios.
- How the groups were sampledA cohort or trial supplies group risks. Case-control sampling alone does not identify those risks.
- The desired measure and follow-up horizonsummaryMeasureChoose odds or risks before calculating. Compare the same outcome period in both groups.
- People contribute independently and only once.How to check: Repeated outcomes, matching, clinics or survey weights require methods that preserve those features.
- Counts are adequate for the large-sample log approximation.How to check: All four cells must be positive for Woolf. Positive event counts are needed for Katz; positivity alone does not ensure reliable coverage.
- A causal reading needs a design or assumptions that control confounding.How to check: A crude table alone does not establish a causal effect.
Plain language
How it works
Label the cells a and b for treatment events and non-events; c and d for controls. The sample odds ratio is ad divided by bc. The risk ratio is [a/(a+b)] divided by [c/(c+d)].
Woolf uses log odds ratio plus or minus a normal quantile times the square root of (1/a + 1/b + 1/c + 1/d). Katz replaces that variance with 1/a - 1/(a+b) + 1/c - 1/(c+d) for the log risk ratio. Exponentiate both limits. Sparse or zero cells need justified score, likelihood or exact methods, not automatic half-cell additions. Conditional estimates require conditional intervals.
Non-collapsibility means pooling over an outcome predictor can change the odds ratio without confounding. Crude and adjusted odds ratios can target different quantities.
Worked example
A worked example
- Setting
- Two independent trial groups each contain 100 people with complete 30-day outcomes.
- Question
- How do event risks and event odds compare for treatment versus control?
- Approach
- Treatment: 20 events and 80 non-events. Control: 40 events and 60 non-events. Use Woolf and Katz two-sided 95% log intervals.
- Result
- Risks are 20 in 100 versus 40 in 100. The risk ratio is 0.50 (Katz interval 0.32 to 0.79). The odds ratio is 0.375 (Woolf interval 0.20 to 0.71).
- What it means
- The observed risk is halved, while the odds ratio is further from one. Neither interval uses Wilson or Clopper-Pearson limits for the ratio.
In practice
Recent studies PubMed search · not vetted
Watch out
Common mistakes
The one to remember
Match the interval to the estimator: Woolf for a sample cross-product odds ratio, Katz for a crude risk ratio. Sparse cells need other methods. An odds ratio is not a risk ratio.
- Calling an odds ratio a risk ratio when outcomes are common.Instead: Report the actual group risks and their ratio. Odds equal events divided by non-events.
- Dividing two single-proportion interval endpoints to make a ratio interval.Instead: Use Woolf or Katz log intervals for these crude estimators, or a justified alternative. A conditional odds estimator needs its own conditional interval.
- Reading a changed odds ratio after adjustment as proof of confounding.Instead: Odds ratios are non-collapsible. Conditional and marginal odds ratios can differ without confounding when a covariate predicts the outcome.
Inside Mallard
How Mallard uses this
Mallard links this article to its Treatment 2×2 calculator. The tool uses log intervals for the sample odds and risk ratios. Plans do not link directly to this article yet.
analysis.odds_risk_ratio_2x2, the id a plan cue records.How to report it
Report all four labeled counts, group risks, the contrast direction and follow-up period. Name the sample odds-ratio and risk-ratio estimators and their Woolf and Katz interval methods. A reporting guideline is not a design manual: use it to make the study transparent, not as a substitute for careful design. Check the target journal's own requirements as well, which this page cannot know.
Work it out
Related Learn pages
Related designs and methods
Evidence
Sources & further reading
- On estimating the relation between blood group and disease (opens in a new tab) · Ann Hum Genet · doi 10.1111/j.1469-1809.1955.tb01348.x
- Confidence intervals for odds ratio and relative risk based on the inverse hyperbolic sine transformation (opens in a new tab) · Stat Med · doi 10.1002/sim.5714
- Noncollapsibility, confounding, and sparse-data bias. Part 1: The oddities of odds (opens in a new tab) · J Clin Epidemiol · doi 10.1016/j.jclinepi.2021.06.007