Odds Ratio (2×2) — case-control / cross-sectional
VerifiedAdvanced & specialized
Run this test straight away on a free built-in teaching dataset — no data of your own needed — or bring your own. Either opens the guided workspace: variable setup, assumption diagnostics, results with effect sizes and confidence intervals, figures, and APA-ready reporting.
Loading teaching datasets…
Or use your own dataset
Loading your datasets…
2×2 odds ratio with Woolf log-normal 95% CI plus Fisher's exact two-sided p as a small-sample-safe companion.
The key practical advantage of OR over RR: it's valid in prospective, retrospective, cross-sectional, AND case-control designs — RR is biased on case-control data. Under rare outcomes (baseline < 10%) OR ≈ RR; in common-outcome regimes (>30% baseline) the engine surfaces a primary-voice qualifier reminding the reader OR overstates RR there.
Worked example
How much does exposure change the odds of the outcome?
The odds ratio from a 2×2 table compares the odds of the outcome between exposed and unexposed groups.
Exposure roughly doubled the odds (OR = 2.1, 95% CI [1.3, 3.4], p = .003).
The 2×2 odds ratio showed exposure was associated with higher odds of the outcome, OR = 2.1, 95% CI [1.3, 3.4], p = .003.
When to use it
- Case-control study (retrospective)An epidemiologist samples 100 lung-cancer cases from a registry and 100 age-matched controls from the same catchment.
- Cross-sectional binary × binary associationA workplace survey records remote-work status (yes/no) and self-reported burnout (yes/no) for 800 employees.
- Logistic regression effect size (single binary predictor)Before fitting a logistic regression of treatment response on multiple covariates, the analyst computes the unadjusted 2×2 OR for the primary exposure.
When NOT to — use instead
- Cohort / prospective study with rare outcomeRR is the natural effect measure for cohort designs. → Relative Risk (2\u00d72) \u2014 cohort / prospective risk ratio
- 2×2 with any cell count below 5The asymptotic Wald CI is unreliable on small cells; Fisher's exact is the small-sample-safe alternative. → Fisher's Exact Test
- More than 2 categories on either axisOR is binary × binary by construction. → Binomial Logistic Regression \u2014 odds ratios + ROC AUC + classification
- Stratified analysis with effect-modificationWhen association varies across strata, a single OR is misleading. → Cochran-Mantel-Haenszel (stratified 2\u00d72)
Hypotheses
Parameter tested: odds ratio OR
Assumptions (and what to do if they fail)
Check: min cell.
If violated: Zero breaks Woolf CI.
Check: p_unexposed.
If violated: OR overstates effect magnitude vs RR when outcome is common.
Ready to run a Odds Ratio (2×2) — case-control / cross-sectional on your own data?
Guided setup, automatic assumption checks, effect sizes, figures and an APA write-up.
Run this test →