Atlas
statminds
Categorical Effect (Relative Likelihood Model)The underlying model family class (e.g. GLM, linear model, categorical matrix, log-linear).Parametric ReferenceStatistical methods that assume a specific probability distribution family (typically normal).12-stage workflow

Odds Ratio (OR) Test

The engine for Likelihood Discovery. The Odds Ratio (OR) audits the relative chance of an outcome occurring in one group vs. another, providing the definitive metric for clinical and epidemiological association.

Model familyCategorical Effect (Relative Likelihood Model)
Hypothesistwo-tailed (can be one-tailed for directional hypotheses)
AliasesOR Test · Relative Odds Index · Case-Control Association Audit
G1
Likelihood Audit
Determine if group membership (e.g., Treatment vs. Control) significantly alters the odds of a binary success.
G2
Directional Synergy Discovery
Identify if a factor acts as a 'Risk Multiplier' or a 'Protective Shield' for the outcome.
G3
Clinical Weight Mapping
Quantify the magnitude of association in a way that remains valid for both cohort and case-control designs.
Visual Overview Dashboard
1

What is it?

Odds Ratio (OR) Test is a specialized statistical test used to evaluate proportions, multivariate mean vectors, or clinical equivalence margins.

The engine for Likelihood Discovery. The Odds Ratio (OR) audits the relative chance of an outcome occurring in one group vs. another, providing the definitive metric for clinical and epidemiological association.

2

Goals & Indications

  • Likelihood Audit: Determine if group membership (e.g., Treatment vs. Control) significantly alters the odds of a binary success.
  • Directional Synergy Discovery: Identify if a factor acts as a 'Risk Multiplier' or a 'Protective Shield' for the outcome.
  • Clinical Weight Mapping: Quantify the magnitude of association in a way that remains valid for both cohort and case-control designs.
3

Core Idea Diagram

EstimateEquivalence Zone
4

Claims tested

H₀: H₀: OR = 1 (no association between exposure and outcome; odds are equal in both groups)
Hₐ: Hₐ: OR ≠ 1 (association exists; odds differ between exposed and unexposed groups)
5

How it works

  1. Construct a 2x2 contingency table mapping exposure and outcomes.
  2. Calculate odds ratio: OR = (a * d) / (b * c).
  3. Compute standard error of log-transformed odds ratio.
  4. Establish confidence interval; OR = 1.0 represents no difference.
6

Assumptions

Independence of observations: Each subject contributes one observation
Case-control or cross-sectional design: Study design supports OR calculation
Adequate cell counts for asymptotic CI estimation: Large enough sample for normal approximation
7

Important Note

OR = (a×d)/(b×c) from 2×2 table. OR > 1 indicates increased odds in exposed group; OR < 1 indicates decreased odds. Confidence interval excluding 1.0 indicates statistical significance at α level.

8

Worked Example

MetricOdds Ratio (OR)95% Confidence IntervalSignificant?
OR Exposure2.45[1.15, 5.22]Yes (exceeds 1)

Odds Ratio (OR) Analysis Laboratory

The Odds Ratio test compares the odds of exposure among cases to the odds of exposure among controls in case-control/observational studies.

The 12-Stage Precision Workflow
01OR Parity
Hypotheses
We test the null of 'Odds Unity' (OR = 1.0) against the discovery of a significant shift in likelihood.
02Binary Independence
Assumptions
Ensuring participants are independent and the outcome is truly dichotomous—the foundational mandate for OR math.
03Sparse Cell Audit
Diagnostics
Checking for 'Zero-Cells' in the 2x2 grid—if found, the OR math explodes, requiring a 'Haldane-Anscombe' correction (+0.5).
04focus
Testing the odds of 'Pain-Free Success' in FlowMotion practitioners compared to a sedentary control group.
05Relative Risk Pivot
Alternatives
Knowing when to switch to Relative Risk (RR) if you are working with a prospective cohort and want to model 'Probabilities' rather than 'Odds'.
06Confidence Strikes
Significance
Reporting the 95% Confidence Interval—if the interval contains 1.0, the discovery is non-significant, regardless of the point estimate.
07Magnitude Interpretation
Effect Size
Interpreting OR: 1.5 indicates 50% higher odds; 0.5 indicates a 50% reduction in odds compared to the reference group.
08The Precision Buffer
Sample Size
Calculating the N required to ensure the Confidence Interval is tight enough to exclude 1.0 with clinical authority.
09The Odds Narrative
Reporting
Reporting the OR and CI clearly: 'The odds of success were 3.2 times higher in the treatment group (OR = 3.20, 95% CI [1.8, 5.4]).'
10epitools / or.test
Software
Executing 'oddsratio()' commands, ensuring the 2x2 table is correctly oriented (Outcomes in rows, Groups in columns).
11focus
The fatal error of treating 'Odds' as 'Probability'—which leads to extreme over-estimation of effect if the outcome is common.
12focus
Tracing the model back to Cornfield (1951) and the foundational evolution of medical risk forensics.
01Hypothesis test logic

Hypotheses

Pragmatic null and alternative hypotheses defined in mathematical notation.

A hypothesis is a question sharpened to a point. Ambiguity is the enemy of inference.
Logic Core
Null · H₀

H₀: OR = 1 (no association between exposure and outcome; odds are equal in both groups)

Alternative · Hₐ

Hₐ: OR ≠ 1 (association exists; odds differ between exposed and unexposed groups)

Why it matters two-tailed (can be one-tailed for directional hypotheses)

OR = (a×d)/(b×c) from 2×2 table. OR > 1 indicates increased odds in exposed group; OR < 1 indicates decreased odds. Confidence interval excluding 1.0 indicates statistical significance at α level.

02Model diagnostics

Assumptions

The core mathematical criteria needed to ensure that statistical testing remains unbiased and valid.

Build your analysis on rock, not sand. Verify the mathematical foundation before building the model.
Integrity Shield
6
Assumptions
4
Critical / High Severity
How to check
Quick
Verify study design: check if any subject IDs appear multiple times; confirm no family/cluster structure; verify random sampling
Rigorous
Calculate intraclass correlation (ICC) if clustering suspected; review sampling design documentation; check for matching in case-control studies (if matched, use conditional logistic regression instead)
If violated
If matched case-control design → use conditional logistic regression (accounts for matching). If clustered data (e.g., multiple observations per site/family) → use mixed-effects logistic regression with random effects for clusters, or use GEE with exchangeable correlation structure. If repeated measures → use GEE or mixed-effects models with subject-level random effects
How to check
Quick
Verify study design: Case-control samples by outcome status (cases/controls) then measures exposure retrospectively. Cross-sectional measures exposure and outcome simultaneously. Cohort/RCT follows exposed/unexposed forward in time
Rigorous
Review study protocol and sampling scheme. Check temporal sequence: case-control is retrospective (outcome → exposure); cohort is prospective (exposure → outcome). Confirm whether sampling was by outcome status (case-control) or exposure status (cohort)
If violated
If cohort/prospective/RCT design → use Relative Risk (RR) instead of OR, as RR directly estimates risk ratio and is more interpretable when outcome is common (>10%). OR approximates RR only when outcome is rare (<10%). If outcome is common in cohort study, OR will overestimate RR and mislead about actual risk increase
relative risk test
How to check
Quick
Inspect 2×2 table: check all four cells have n ≥ 5. Calculate expected counts if cells are small
Rigorous
Use Woolf's formula standard error: SE(log OR) = sqrt(1/a + 1/b + 1/c + 1/d). If any cell < 5, asymptotic methods may be unreliable; exact methods preferred
If violated
If any cell < 5 or total n < 40: (1) Use Fisher's exact test for significance testing (exact p-value); (2) Use exact confidence intervals (e.g., mid-p method) instead of Wald or Woolf CI; (3) If zero cells exist, add 0.5 to all cells (continuity correction) to compute OR, but note this is approximate. Never report OR from sparse data without acknowledging uncertainty
fisher exact
How to check
Quick
Create directed acyclic graph (DAG) of hypothesized relationships; identify potential confounders (variables associated with both exposure and outcome); check if known confounders were measured
Rigorous
Use stratified analysis (Mantel-Haenszel OR) or multivariable logistic regression to adjust for confounders. Compare crude OR vs adjusted OR; if substantially different (>10-15% change), confounding present. Conduct sensitivity analyses for unmeasured confounding (E-value calculation)
If violated
Use multivariable logistic regression to adjust for measured confounders (reports adjusted OR with 95% CI). Use Mantel-Haenszel method for stratified analysis if few confounders. Use propensity score matching/weighting to balance confounders in observational studies. Calculate E-value to quantify robustness to unmeasured confounding. Be explicit about causal inference limitations in observational designs
logistic regressionpropensity score matching
How to check
Quick
Verify exposure has exactly 2 levels (exposed/unexposed) and outcome has exactly 2 levels (case/control or disease/no disease). Check for natural binary (yes/no, present/absent) vs artificially dichotomized continuous variables
Rigorous
If originally continuous or ordinal, question whether dichotomization is scientifically justified. Dichotomization loses information and statistical power. Check if cutpoints are clinically meaningful and pre-specified (not data-driven)
If violated
If exposure is ordinal (3+ levels) → use Cochran-Armitage trend test or ordinal logistic regression. If exposure is continuous → use logistic regression with continuous predictor (reports OR per unit change). If outcome has >2 categories → use multinomial logistic regression. Avoid arbitrary dichotomization of continuous variables when possible (reduces power and can introduce bias)
logistic regression
How to check
Quick
Calculate OR separately for relevant subgroups (e.g., by sex, age group). Visually compare point estimates and CI overlap. Large differences suggest effect modification
Rigorous
Breslow-Day test for homogeneity of ORs across strata (p > .05 indicates homogeneous effects). Include interaction term in logistic regression (e.g., exposure × sex); significant interaction (p < .05) indicates effect modification. Use Mantel-Haenszel test only if Breslow-Day p > .05
If violated
If Breslow-Day p < .05 (heterogeneous ORs): DO NOT pool estimates with Mantel-Haenszel method. Instead: (1) Report stratified ORs separately for each subgroup; (2) Use logistic regression with interaction terms to formally test and quantify effect modification; (3) Present forest plot showing stratum-specific ORs. Acknowledge effect heterogeneity and interpret results within strata
03Residual Forensics

Diagnostics

Checking residual plots and indices to examine model deviations and ensure standard error integrity.

Trust, but verify. The outliers often hold more truth than the averages.
System Health
Essential checks
  1. Inspect 2×2 contingency table for adequate cell counts (all ≥5)
  2. Check for zero cells (requires continuity correction or exact methods)
  3. Verify independence assumption via study design review
Recommended checks
  1. Breslow-Day test for homogeneity of ORs if stratifying
  2. Compare crude vs adjusted OR to assess confounding
  3. Forest plot for stratified ORs to visualize heterogeneity
  4. Sensitivity analysis with E-value for unmeasured confounding
  5. Mantel-Haenszel test if pooling strata (only if Breslow-Day p > .05)
04Live Instances

Applied Minds

Review concrete study examples, data layout guidelines, and copy executable syntax scripts.

Theory is the map. Practice is the terrain. Simulation bridges the gap.
Applied Wisdom
Example 01

Smoking and Lung Cancer (Classic Case-Control Design)

Research question: Is smoking associated with lung cancer risk? Design: Case-control study with 200 lung cancer cases and 200 matched hospital controls without lung cancer. Exposure: Current/former smoker (yes/no). Outcome: Lung cancer diagnosis (case/control). This replicates the landmark case-control studies establishing the smoking-lung cancer association (OR typically 10-20).

DesignCase-control study
Total n400
Outcome ScaleLung cancer diagnosis (binary: case/control)
# Odds Ratio: Smoking and Lung Cancer (Case-Control Study)
# Simulates classic epidemiological design establishing smoking-cancer link

library(epitools)   # For oddsratio() with CI
library(vcd)        # For fourfold plot
library(ggplot2)
library(dplyr)

# Set seed for reproducibility
set.seed(2025)

# === Simulate realistic case-control data ===
# OR ≈ 15 (strong association based on Doll & Hill findings)
# Exposure prevalence: 80% in cases, 30% in controls

n_cases <- 200
n_controls <- 200

# Cases: 80% exposed (160 smokers, 40 non-smokers)
cases_exposed <- 160
cases_unexposed <- 40

# Controls: 30% exposed (60 smokers, 140 non-smokers)
controls_exposed <- 60
controls_unexposed <- 140

# Create 2x2 contingency table
# Rows: Exposure (Smoker, Non-smoker)
# Columns: Outcome (Case, Control)
table_data <- matrix(c(cases_exposed, controls_exposed,
                       cases_unexposed, controls_unexposed),
                     nrow = 2, byrow = TRUE,
                     dimnames = list(
                       Exposure = c("Smoker", "Non-smoker"),
                       Outcome = c("Case", "Control")
                     ))

print("=== 2x2 Contingency Table ===")
print(table_data)
print(addmargins(table_data))  # Add row/column totals

# === STEP 1: Check Assumptions ===

# 1. Independence: Verify study design (case-control, no matching)
cat("\n=== Assumption Checks ===\n")
cat("Independence: Case-control design with independent sampling ✓\n")

# 2. Adequate cell counts (all ≥ 5)
min_cell <- min(table_data)
cat("Minimum cell count:", min_cell, ifelse(min_cell >= 5, "✓", "✗ Use exact methods"), "\n")

# 3. No zero cells
zero_cells <- sum(table_data == 0)
cat("Zero cells:", zero_cells, ifelse(zero_cells == 0, "✓", "✗ Add continuity correction"), "\n")

# === STEP 2: Calculate Odds Ratio with 95% CI ===

cat("\n=== Odds Ratio Calculation ===\n")

# Method 1: Manual calculation
a <- table_data[1,1]  # Cases exposed
b <- table_data[1,2]  # Controls exposed
c <- table_data[2,1]  # Cases unexposed
d <- table_data[2,2]  # Controls unexposed

OR_manual <- (a * d) / (b * c)
cat("Manual OR = (a×d)/(b×c) =", OR_manual, "\n")

# Calculate 95% CI using Woolf's method (log scale)
log_OR <- log(OR_manual)
SE_log_OR <- sqrt(1/a + 1/b + 1/c + 1/d)
CI_lower <- exp(log_OR - 1.96 * SE_log_OR)
CI_upper <- exp(log_OR + 1.96 * SE_log_OR)

cat("95% CI(Woolf):", round(CI_lower, 2), "-", round(CI_upper, 2), "\n")

# Method 2: Using epitools package
or_result <- oddsratio(table_data, method = "wald")
print(or_result)

# Method 3: Fisher's exact test (provides exact p-value)
fisher_result <- fisher.test(table_data)
cat("\nFisher's Exact Test:")
cat("\nOR =", fisher_result$estimate)
cat("\n95% CI:", fisher_result$conf.int[1], "-", fisher_result$conf.int[2])
cat("\np-value =", fisher_result$p.value, "\n")

# === STEP 3: Hypothesis Test ===
cat("\n=== Hypothesis Test ===\n")
cat("H₀: OR = 1 (no association)\n")
cat("Hₐ: OR ≠ 1 (association exists)\n")

if (CI_lower > 1) {
  cat("\nResult: Reject H₀. OR significantly > 1 (p < .05)\n")
  cat("Smoking is associated with INCREASED odds of lung cancer\n")
} else if (CI_upper < 1) {
  cat("\nResult: Reject H₀. OR significantly < 1 (p < .05)\n")
  cat("Exposure is associated with DECREASED odds of outcome\n")
} else {
  cat("\nResult: Fail to reject H₀. 95% CI includes 1.0\n")
  cat("No significant association detected\n")
}

# === STEP 4: Visualizations ===

# 4.1 Fourfold plot (association display)
png("fourfold_plot.png", width=800, height=600)
fourfoldplot(table_data, color=c("#E69F00", "#56B4E9"),
             conf.level=0, margin=1,
             main="Smoking and Lung Cancer\n(Case-Control Study)")
dev.off()

# 4.2 Mosaic plot
png("mosaic_plot.png", width=800, height=600)
mosaicplot(table_data, color=TRUE, shade=TRUE,
           main="Association: Smoking → Lung Cancer",
           xlab="Smoking Status", ylab="Disease Status")
dev.off()

# 4.3 Forest plot (OR with CI)
forest_data <- data.frame(
  Study = "Smoking vs Lung Cancer",
  OR = OR_manual,
  CI_lower = CI_lower,
  CI_upper = CI_upper
)

library(ggplot2)
ggplot(forest_data, aes(y=Study, x=OR)) +
  geom_point(size=4, color="darkblue") +
  geom_errorbarh(aes(xmin=CI_lower, xmax=CI_upper), height=0.2, linewidth=1) +
  geom_vline(xintercept=1, linetype="dashed", color="red", linewidth=1) +
  scale_x_log10(breaks=c(0.5, 1, 2, 5, 10, 20, 30)) +
  labs(title="Odds Ratio: Smoking and Lung Cancer",
       subtitle="Case-Control Study(n=400)",
       x="Odds Ratio(log scale) with 95% CI",
       y="") +
  theme_classic(base_size=14) +
  annotate("text", x=OR_manual, y=1.3, 
           label=paste0("OR = ", round(OR_manual, 2), 
                       "\n95% CI: ", round(CI_lower, 2), "-", round(CI_upper, 2)),
           size=5, fontface="bold")

ggsave("forest_plot_or.png", width=10, height=6)

# 4.4 Bar plot comparing exposure prevalence
exposure_prev <- data.frame(
  Group = c("Cases\n(Lung Cancer)", "Controls\n(No Cancer)"),
  Prevalence = c(cases_exposed/n_cases * 100, 
                 controls_exposed/n_controls * 100)
)

ggplot(exposure_prev, aes(x=Group, y=Prevalence, fill=Group)) +
  geom_bar(stat="identity", width=0.6, alpha=0.8) +
  geom_text(aes(label=paste0(round(Prevalence, 1), "%")), 
            vjust=-0.5, size=6, fontface="bold") +
  scale_fill_manual(values=c("#E69F00", "#56B4E9")) +
  labs(title="Smoking Prevalence: Cases vs Controls",
       y="Smoking Prevalence(%)",
       x="") +
  theme_classic(base_size=14) +
  theme(legend.position="none") +
  ylim(0, 100)

ggsave("exposure_prevalence.png", width=8, height=6)

# === STEP 5: Sensitivity Analysis (Continuity Correction) ===
cat("\n=== Sensitivity Analysis ===\n")

# Add 0.5 to all cells (Haldane-Anscombe correction)
table_corrected <- table_data + 0.5
OR_corrected <- (table_corrected[1,1] * table_corrected[2,2]) / 
                (table_corrected[1,2] * table_corrected[2,1])

cat("OR with continuity correction(+0.5):", round(OR_corrected, 2), "\n")
cat("Change from uncorrected OR:", round(OR_corrected - OR_manual, 2), "\n")

# === APA-Style Reporting ===
cat("\n=== APA-Style Report ===\n")
cat(sprintf(
  "A case-control study(n=400) examined the association between smoking and lung cancer.\n
Among 200 lung cancer cases, 160 (80%%) were smokers compared to 60 (30%%) of 200 controls.\n
The odds of lung cancer were %.1f times higher in smokers than non-smokers\n(OR = %.2f, 95%% CI [%.2f, %.2f], p < .001, Fisher's exact test).\n\nThis strong association(OR > 10) is consistent with the causal relationship between\nsmoking and lung cancer established in landmark epidemiological studies(Doll & Hill, 1950).\n\nThe 95%% confidence interval excludes 1.0, indicating statistical significance at α = .05.\n\nInterpretation: Smokers have %.0f times the odds of lung cancer compared to non-smokers\nin this case-control sample. This OR magnitude aligns with meta-analytic estimates\n(pooled OR ≈ 8-20 for current smokers).",
  OR_manual, OR_manual, CI_lower, CI_upper, OR_manual
))

# === STEP 6: Calculate Additional Measures ===
cat("\n\n=== Additional Effect Measures ===\n")

# Attributable fraction among exposed (AFe)
AFe <- (OR_manual - 1) / OR_manual * 100
cat("Attributable fraction(exposed):", round(AFe, 1), "%\n")
cat("Interpretation:", round(AFe, 1), "% of lung cancer in smokers is attributable to smoking\n")

# Population attributable fraction (PAF)
p_exposed <- (cases_exposed + controls_exposed) / (n_cases + n_controls)
PAF <- p_exposed * (OR_manual - 1) / (1 + p_exposed * (OR_manual - 1)) * 100
cat("\nPopulation attributable fraction:", round(PAF, 1), "%\n")
cat("Interpretation:", round(PAF, 1), "% of all lung cancer could be prevented by eliminating smoking\n")
Interpretation Blueprint

OR = 9.33, 95% CI [5.93, 14.68], p < .001. Smokers had 9.33 times the odds of lung cancer compared to non-smokers in this case-control study. The 95% CI excludes 1.0, indicating strong statistical significance. The attributable fraction among exposed (89.3%) suggests that nearly 90% of lung cancer cases in smokers are attributable to smoking. This OR magnitude (9-10) is consistent with classic epidemiological findings from Doll & Hill (1950) and meta-analyses, providing strong evidence for the smoking-lung cancer causal relationship. The large effect size and narrow confidence interval reflect the robust association observed in case-control designs.

05Tactical Pivots

Alternatives

Structured fallback pathways for choosing alternative tests when normality or slopes requirements fail.

When the path is blocked, pivot. Rigor is not rigidity; it is the intelligent adaptation to reality.
Adaptive Strategy
Measurement Precision Ladder Ideal · Binary x Binary
Ratio
Consider Multiple Regression. Stratifying continuous data for OR audits creates 'Information Leaks'.
Logic Collapse
Ordinal
Pivot to Proportional Odds Regression to preserve the natural rank of your categorical thresholds.
Threshold Loss
Binary
Maintain OR logic. The definitive engine for auditing likelihood in 2x2 grids.
Peak Signal
Temporal Trajectory Audit Static Likelihood Snapshot
Static Audit
Cross-sectional risk.
Stay with OR Test. Quantify relative odds without temporal dependency.
Longitudinal
Trajectory flips.
Pivot to Conditional Logistic Regression or GEE to account for matched-pair or repeated clustering.
Adaptive Technical Safeguards · adaptive safeguards
retrospective to prospective
  • Relative Risk (RR) Pivot — Switch to probability ratios if you have total group N and know the incidence rate.
sparsity detected
  • Haldane-Anscombe Correction — Add 0.5 to zero-cells to stabilize the OR calculation.
  • Fisher's Exact Test — Calculate exact probability if the 2x2 grid is dangerously sparse.
multicollinearity
  • Multiple Logistic Regression — The elite path when you need to control for more than one baseline confounder.
06Adjusted Comparisons

Post-hoc

Group mean comparisons and correction controls (e.g. Tukey HSD, Bonferroni) to protect against Family-Wise Error Rates.

The omnibus test opens the door; post-hoc analysis explores the room.
Forensic Detail
Adjusted Comparisons

Post-hoc pairwise tests defined for this model.

Interpretation Guidelines

The Odds Ratio is the currency of case-control discovery. Use stratified audits to find where the risk is most concentrated, ensuring your signal isn't a shadow of a hidden variable.

07Standardized scale impact

Effect Size

Understanding effect sizes (e.g., Cohen's d, Partial Eta-Squared) and clinical impact benchmarks.

Significance is noise. Magnitude is the signal. Measure the impact, not just the probability.
Impact Magnitude

OR = 1: no association. OR > 1: increased odds in exposed. OR < 1: decreased odds in exposed. OR = 2: exposed have twice the odds. OR = 0.5: exposed have half the odds.

OR 1.0-1.5: small effect. OR 1.5-3.0: medium effect. OR > 3.0: large effect. OR > 10: very large effect (e.g., smoking-lung cancer).

If 95% CI excludes 1.0, association is statistically significant at α = .05. Wide CI indicates imprecision; narrow CI indicates precision.

When outcome is rare (<10%), OR approximates relative risk (RR). When outcome is common (>10%), OR overestimates RR and should not be interpreted as risk ratio.

Recommended Metric: OR with 95% CI (primary); attributable fraction for public health interpretation
Small
0.2
Medium
0.5
Large
0.8
0.50
OR with 95% CI (primary); attributable fraction for public health interpretation
Recommended Measure
5
Available Metrics
ReportUse OR with 95% CI (primary); attributable fraction for public health interpretation to represent clinical impact magnitude.
08Statistical Power

Sample Size

Guidelines for minimum sample requirements and power analysis parameters.

An underpowered study is an ethical failure. Respect the data by collecting enough of it.
Power Protocol
Floor Requirements

At least 5 observations per cell in 2×2 table for asymptotic methods. Total n ≥ 40 recommended for stable OR estimates.

Effect SizeParametersRequired n
Small EffectOR = 1.5approximately 400-500 cases + 400-500 controls
Medium EffectOR = 2.0approximately 180-200 cases + 180-200 controls
Large EffectOR = 3.0approximately 60-70 cases + 60-70 controls
G*Power StrategyUse G*Power or R package 'pwr': specify OR (or proportions p1, p2), α, power, ratio of cases to controls. Unequal case-control ratios reduce efficiency; aim for 1:1 when possible.
09APA narrative blueprint

Reporting

How to compile statistical results into publication prose matching APA and journal style guides.

Data does not speak for itself. It requires a translator. Be clear, be precise, be honest.
Narrative Arc
Worked APA paragraph example
A case-control study (n=400) examined the association between smoking and lung cancer. Among 200 lung cancer cases, 160 (80%) were smokers compared to 60 (30%) of 200 hospital controls. Independence was verified via study design with no matching or clustering. All cell counts exceeded 5, supporting asymptotic inference. The odds of lung cancer were 9.33 times higher in smokers than non-smokers (OR = 9.33, 95% CI [5.93, 14.68], p < .001, Fisher's exact test). This large effect size (OR > 10) is consistent with the well-established causal relationship between smoking and lung cancer from landmark epidemiological studies (Doll & Hill, 1950). The attributable fraction among exposed (89.3%) suggests that approximately 90% of lung cancer cases in smokers are attributable to smoking.
Reusable template

A case-control/cross-sectional study (n = total N) examined the association between exposure and outcome. Among N cases cases, n exposed (%) were exposed to exposure compared to n exposed (%) of N controls controls. If assumptions checked: 'Independence assumption was met via study design review. Cell counts were adequate (all ≥5) for asymptotic inference.' OR 'Due to small cell counts, Fisher's exact test was used.' The odds of outcome were X.XX times higher/lower in exposed group compared to unexposed group (OR = X.XX, 95% CI X.XX, X.XX, p = .XXX, Fisher's exact test/chi-square test). If stratified: 'After stratifying by [confounder, the Mantel-Haenszel pooled OR was X.XX (95% CI X.XX, X.XX, p = .XXX), adjusting for confounding.'] Interpret effect size: small/medium/large; clinical significance. If causal language: only for RCT; otherwise use 'associated with' not 'caused'.

Essential statistics to report
  • Odds ratio (OR) point estimate
  • 95% confidence interval for OR
  • p-value (from Fisher's exact if small sample, chi-square if large sample)
  • 2×2 contingency table with cell counts and percentages
  • Study design (case-control, cross-sectional)
  • Sample sizes (N cases, N controls)
  • Statement about independence assumption
  • If stratified: Breslow-Day test result, Mantel-Haenszel pooled OR
  • Method used (exact vs asymptotic)
10Exhibit Builder

Manuscript Lab

Copy standard summary tables and forensic reporting grids to outline analysis details.

Table 1: Quantifying Clinical Risk: Odds Ratio vs. Relative Risk
MetricEstimate95% CIz-scorep-value
Relative Risk (RR)2.45[1.82, 3.28]6.12< .001
Odds Ratio (OR)3.12[2.15, 4.52]5.82< .001
Absolute Risk Reduction12.4%[8.5%, 16.3%]
Note. Prospective Cohort Design. N = 500. Outcome: Adverse Event.
RR = 2.45Powerful Population Signal. A more than double risk identifies the exposure as a critical determinant of clinical outcomes.
OR > RRIdentifies Common Outcome. Since OR (3.12) is much larger than RR (2.45), the event is relatively common (>10%), making the OR a poor approximation of RR.
Header glossary

The 'Probability Ratio'. RR = 2.45 means the exposed group is 2.45 times more likely to experience the event compared to the control.

The 'Betting Ratio'. OR = 3.12 means the 'odds' of having the event are 3.12 times higher in the exposed group. Note: OR always exaggerates risk compared to RR.

11Algorithmic Logic

Command Center

Syntax libraries and function parameters for executing calculations in stats packages.

Code is the modern laboratory. Clean execution ensures reproducible discovery.
Execution Engine
# 1. Execute Odds Ratio with confidence intervals
epitools::oddsratio(matrix(c(a, b, c, d), nrow=2))
Library stack
R
epitools
Python
statsmodels.stats.contingency_tables
Elite Forensic Strike

Odds Ratios are symmetric and work well for case-control designs. If data is prospective/cohort-based, Relative Risk is mathematically appropriate.

# Run Cochran-Mantel-Haenszel test for stratified 2x2 tables
mantelhaen.test(my_3d_table)
12The Over-adjustment Trap

Common Mistakes

Analytical caveats and corrections to maintain modeling integrity.

Wisdom is learning from the failures of others. Anticipate the error before it occurs.
Defensive Logic
Why it's wrong
OR and RR are mathematically different. When outcome is common (>10%), OR overestimates RR and can mislead about actual risk increase. For example, if 40% of exposed and 20% of unexposed develop disease: RR = 40/20 = 2.0 (2-fold risk increase), but OR = (0.4/0.6)/(0.2/0.8) = 2.67 (appears as 2.67-fold increase). Saying 'risk is 2.67 times higher' is incorrect; it's the odds that are 2.67 times higher. Only when disease is rare (<10%) does OR approximate RR via rare disease assumption.
The correction
Use precise language: 'odds were X times higher' not 'risk was X times higher'. Use OR for case-control studies (where RR cannot be calculated). Use RR for cohort/RCT designs when outcome incidence is known. If outcome is common, consider log-binomial regression to directly estimate RR instead of logistic regression OR.
Why it's wrong
Logistic regression reports ORs, which are less intuitive than RRs for clinicians and patients. When outcome incidence is available (cohort/RCT), RR directly answers 'How much more likely is the outcome?' whereas OR answers 'How much higher are the odds?' For common outcomes, OR exaggerates effect size compared to RR, leading to overestimation of clinical impact.
The correction
For cohort studies or RCTs with common outcomes (>10%), use log-binomial regression (family=binomial, link=log in R/Python) to directly estimate RR instead of OR. If log-binomial fails to converge, use modified Poisson regression with robust standard errors (family=poisson, link=log). Only use OR when required by design (case-control) or when RR methods fail.
Why it's wrong
Case-control studies sample by outcome status (fixing marginal totals for cases/controls), making incidence rates unknowable; only OR can be estimated. Cohort studies sample by exposure status (or random sample), allowing calculation of both OR and RR. Using OR from cohort data when RR is more appropriate wastes information and reduces interpretability.
The correction
Match the effect measure to study design: case-control → OR only; cohort/RCT → prefer RR (unless outcome rare, then OR ≈ RR). Always state study design when reporting OR to clarify why OR was used instead of RR.
Why it's wrong
Crude ORs can be severely biased by confounding. For example, apparent association between coffee and pancreatic cancer (OR=2.5) disappeared (OR=1.0) after adjusting for smoking, because smokers drink more coffee and smoking causes cancer. Confounding can create spurious associations or mask true associations.
The correction
Use stratified analysis (Mantel-Haenszel OR) or multivariable logistic regression to adjust for known confounders. Compare crude vs adjusted OR; >10-15% change indicates confounding. Report both crude and adjusted ORs with list of adjusted covariates. Use DAGs (directed acyclic graphs) to identify confounders to control. Acknowledge limitations of unmeasured confounding; calculate E-value to assess robustness.
Why it's wrong
Wald CIs assume large-sample normal approximation and perform poorly when n < 40 or any cell count < 5. They can be too narrow (anti-conservative), yielding false precision, or include impossible values (e.g., negative OR). With zero cells, Wald CI is undefined without continuity correction.
The correction
For small samples (n < 40) or sparse cells (any cell < 5): (1) Use Fisher's exact test for p-value and exact CI (most conservative); (2) Use mid-p exact CI (compromise between Wald and exact); (3) If zero cells, add 0.5 to all cells (Haldane-Anscombe correction) but acknowledge approximation. Always report which CI method was used. Never trust Wald CI with small samples.
Why it's wrong
Mantel-Haenszel pooled OR assumes effect is homogeneous (constant) across strata. If Breslow-Day test shows heterogeneous ORs (p < .05), meaning effect differs by stratum (effect modification), then pooling is misleading. For example, if OR=5.0 in men and OR=1.0 in women, pooled OR=2.5 obscures the sex difference and suggests moderate effect for both sexes when effect is actually strong in men only.
The correction
ALWAYS run Breslow-Day test before Mantel-Haenszel pooling. If p > .05 (homogeneous), proceed with pooled OR. If p < .05 (heterogeneous), DO NOT POOL; instead report stratum-specific ORs separately and discuss effect modification. Use logistic regression with interaction terms to formally test and quantify effect heterogeneity.
Why it's wrong
Continuity correction was designed for zero cells to allow OR calculation, but it introduces bias by artificially altering the data. When all cells have counts, correction is unnecessary and reduces accuracy. Over-use of correction leads to unnecessarily conservative estimates.
The correction
Only add 0.5 continuity correction (Haldane-Anscombe) when zero cells exist (otherwise OR is undefined or infinite). If all cells have counts, use unadjusted OR. For zero cells with small samples, prefer exact methods (Fisher's exact) over continuity correction. Report whether correction was applied.
Why it's wrong
Observational designs cannot establish causation due to unmeasured confounding, reverse causation (especially cross-sectional), and selection bias. Significant OR shows association only. For example, hospital controls in case-control studies may differ systematically from cases in unmeasured ways (Berkson's bias). Cross-sectional studies measure exposure and outcome simultaneously, preventing temporal sequence determination.
The correction
Use causal language ('caused', 'effect') only in randomized controlled trials with proper blinding and ITT analysis. For observational studies, use 'associated with', 'correlated with', or 'predictive of' instead of 'caused'. Acknowledge confounding and selection bias as limitations. Use Hill's criteria to argue for causality (strength, consistency, temporality, biological gradient, plausibility, coherence, experiment, analogy) but never claim definitive causation from observational OR alone.
Why it's wrong
Without the contingency table, readers cannot assess raw data, verify calculations, detect data entry errors, evaluate clinical significance, or include study in meta-analysis. For example, OR=3.0 based on 3 exposed cases vs 1 unexposed case is far less credible than OR=3.0 based on 300 vs 100 cases, but both yield same OR. The table provides essential context for interpreting OR magnitude and precision.
The correction
Always report the full 2×2 contingency table with cell counts (a, b, c, d) and row/column totals. Include percentages within exposure groups to aid interpretation. Report OR, 95% CI, and p-value alongside the table. For stratified analyses, report stratum-specific tables. This transparency allows independent verification and meta-analytic synthesis.
13Academic Lineage

References

Scholarly lineage and citation keys grounding the statistical framework.

We stand on the shoulders of giants. Honor the source of the method.
Academic Lineage
[1]
Doll, R., & Hill, A. B. (1950). Smoking and carcinoma of the lung: Preliminary report. British Medical Journal, 2(4682), 739-748.
Landmark case-control study establishing smoking-lung cancer association with OR ≈ 14. First major epidemiological evidence for tobacco harm. Basis for Example 1.
doi: 10.1136/bmj.2.4682.739
[2]
Lanas, A., García-Rodríguez, L. A., Arroyo, M. T., Gomez, F., Feu, F., González-Pérez, A., & Bujanda, L. (2006). Risk of upper gastrointestinal ulcer bleeding associated with selective COX-2 inhibitors, traditional NSAIDs, aspirin and combinations. American Journal of Gastroenterology, 101(8), 1-8.
Case-control study of aspirin and GI bleeding. OR ≈ 2-4 for regular aspirin use. Demonstrates stratified analysis approach. Basis for Example 2.
doi: 10.1111/j.1572-0241.2006.00684.x
[3]
Szklo, M., & Nieto, F. J. (2018). Epidemiology: Beyond the Basics (4th ed.). Jones & Bartlett Learning.
Comprehensive epidemiology textbook covering odds ratio calculation, interpretation, assumptions, stratified analysis, and Mantel-Haenszel methods. Chapters 4-5 on case-control designs and effect measures.
[4]
Rothman, K. J., Greenland, S., & Lash, T. L. (2008). Modern Epidemiology (3rd ed.). Lippincott Williams & Wilkins.
Gold standard epidemiology reference. Extensive coverage of OR vs RR, confounding, effect modification, and stratified analysis. Chapters 4-5 essential for understanding OR.
[5]
Agresti, A. (2013). Categorical Data Analysis (3rd ed.). Wiley.
Statistical reference for odds ratio estimation, confidence intervals, exact methods, and Mantel-Haenszel pooling. Chapter 3 on 2×2 tables essential.
[6]
VanderWeele, T. J., & Ding, P. (2017). Sensitivity analysis in observational research: Introducing the E-value. Annals of Internal Medicine, 167(4), 268-274.
Introduces E-value for sensitivity analysis of unmeasured confounding in observational studies. Essential tool for assessing robustness of OR estimates.
doi: 10.7326/M16-2607
Odds are not probabilities; they are the ratio of what is to what is not. Respect the difference, or you will exaggerate your discovery.
The Interpretive Rigor Directive
statminds · OddsMind reference · v2.2 · updated 2026-01-1715 of 15 sections