Ask Mallard
Analysis method

Odds ratio and risk ratio from a 2×2 table

5 min read

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

Before you start

What you need

Decide these first
  1. Four counts and reference groupLabel events and non-events for each group. Reversing the group contrast inverts both ratios.
  2. How the groups were sampledA cohort or trial supplies group risks. Case-control sampling alone does not identify those risks.
  3. The desired measure and follow-up horizonsummaryMeasureChoose odds or risks before calculating. Compare the same outcome period in both groups.
It rests on these
  1. People contribute independently and only once.How to check: Repeated outcomes, matching, clinics or survey weights require methods that preserve those features.
  2. 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.
  3. 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)].

Intervals matched to estimators

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.

Why adjustment can change the number

Non-collapsibility means pooling over an outcome predictor can change the odds ratio without confounding. Crude and adjusted odds ratios can target different quantities.

Keep the measure and interval together
Independent 2×2 counts. Then Sample odds ratio with Woolf interval. Then Crude risk ratio with Katz interval.Odds ratio and risk ratio from a 2×2 tableIndependent 2×2 countsSample odds ratio withWoolf intervalCrude risk ratio with KatzintervalTwo measures from the same table; each keeps its own estimator and interval.
Conceptual diagram. It shows the structure of the idea, not data from any study.

Worked example

A worked example

Invented for illustration
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

Searching PubMed…

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.

No Mallard code example points to this page.
Calculators: Treatment 2×2, RR, OR, NNT (§2.9).
Atlas node 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

  1. 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
  2. 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
  3. 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
Prepared with AI assistance. PubMed records checked by title, authors, publication year and DOI on 2026-11-07: record verified, confirm it supports this use. No independent professional approval is claimed. Woolf is the classic odds-ratio source and is indexed in PubMed. Fagerland and Newcombe compare interval methods, including limitations of standard log intervals; their newer methods are not claimed as calculator outputs. Greenland explains non-collapsibility. The Katz et al. (1978) classic did not resolve in PubMed; no PMID is assigned to it.
Last source review: 2026-11-07
AI-generated educational content
Mallard uses reputable methodological and reporting sources, but this material may contain errors or omit important context. Verify important methodological decisions with the cited sources and, when appropriate, a qualified research methodologist or statistician.