Tutorials › Introduction to Statistics › Odds Ratios as Effect Measures in 2×2 Tables

Chi-Square Tests of Independence and Homogeneity · Tutorial 839 of 996

Odds Ratios as Effect Measures in 2x2 Tables

Calculate and interpret odds ratios in context, and distinguish the size of an association from the evidence provided by a chi-square test.

Intermediate 10 min read

What You'll Learn

  • Arrange a 2×2 table and label its four cell counts consistently.
  • Calculate an odds ratio using a cross-product ratio.
  • Interpret an odds ratio above, below, or equal to one in context.
  • Explain why reversing a row or column comparison changes the odds ratio to its reciprocal.
  • Distinguish the size of an odds ratio from the significance of a chi-square test.
  • Recognize what a zero cell means for the ordinary odds-ratio calculation.

Why Use an Odds Ratio?

A 2×2 table summarizes the relationship between two categorical variables, each with two categories. The table can show whether an outcome is more common in one group than another, but a useful comparison needs a clearly defined scale. The odds ratio compares the odds of an outcome in one group with the odds in a second group. It is an effect-size measure: it describes the direction and relative size of an association in the table.

An odds ratio does not, by itself, say whether an observed association is statistically significant. A chi-square test addresses a different question: whether the table provides evidence against the null hypothesis of independence (or, in a homogeneity design, equal outcome distributions across groups). The effect-size estimate and the test result should therefore be read as complementary, not interchangeable.

Defining and Calculating the Odds Ratio

Use the following layout, with the outcome of interest in the first column and the comparison groups in the rows. The four letters are cell counts, not probabilities.

GroupOutcomeNo outcome
Group 1\(a\)\(b\)
Group 2\(c\)\(d\)
Definition: The odds of an outcome in a group are the number of individuals with the outcome divided by the number without it. For this table, the odds in Group 1 are \(a/b\), and the odds in Group 2 are \(c/d\). The odds ratio (OR) comparing Group 1 with Group 2 is the odds in Group 1 divided by the odds in Group 2. When all four cell counts are positive,
$$ \mathrm{OR} = \frac{a/b}{c/d} = \frac{ad}{bc}. $$

The order of comparison matters: this definition compares Group 1 with Group 2 for the outcome in the first column. An odds ratio greater than 1 means the outcome odds are higher in Group 1; an odds ratio less than 1 means they are lower. An odds ratio of 1 means the odds are equal. Reversing the groups or exchanging which outcome is in the first column changes the ratio to its reciprocal.

Odds are not the same as probabilities. If a group has probability \(p\) of the outcome, its odds are \(p/(1-p)\). For example, a probability of 0.20 corresponds to odds \(0.20/0.80=0.25\), or 1 to 4. An odds ratio compares these odds; it is not generally a ratio of probabilities.

Why the Cross-Product Formula Works

The formula can be understood first in terms of probabilities. Let \(p_{11}\) and \(p_{12}\) be the probabilities of the outcome and no outcome in Group 1, and let \(p_{21}\) and \(p_{22}\) be the corresponding probabilities in Group 2. The ratio of the two groups’ odds is

$$ \frac{p_{11}/p_{12}}{p_{21}/p_{22}} = \frac{p_{11}p_{22}}{p_{12}p_{21}}. $$

In a sample, each probability is estimated by its cell count divided by the total sample size \(n\). Substituting these proportions into the ratio makes the common total cancel:

$$ \frac{(a/n)(d/n)}{(b/n)(c/n)} = \frac{ad}{bc}. $$

This shows why the cross-product ratio is the sample odds-ratio estimate. It also explains why multiplying every cell count by the same positive number leaves the odds ratio unchanged: the common multiplier appears twice in both the numerator and denominator and cancels.

Worked Examples

Worked Example: An Odds Ratio Greater Than 1

Suppose, in a hypothetical comparison, 30 people in Group 1 and 15 in Group 2 experience a particular outcome. The remaining 70 people in Group 1 and 85 in Group 2 do not. Calculate and interpret the odds ratio comparing Group 1 with Group 2.

GroupOutcomeNo outcome
Group 13070
Group 21585

All four counts are positive, so the ordinary cross-product calculation is defined. The odds in Group 1 are \(30/70\); the odds in Group 2 are \(15/85\). Therefore,

$$ \mathrm{OR} = \frac{30/70}{15/85} = \frac{30 \times 85}{70 \times 15} = \frac{2550}{1050} \approx 2.429. $$

The odds of the outcome in Group 1 are about 2.43 times the odds in Group 2. Equivalently, they are about 143% higher, since \((2.429-1)\times100\%\approx143\%\). This describes the odds, not the ratio of the groups’ outcome probabilities. The table alone also does not establish that group membership caused the difference.

Worked Example: An Odds Ratio Less Than 1

In a second hypothetical comparison, 8 people in Group A and 20 in Group B report a symptom; 92 in Group A and 80 in Group B do not. Calculate the odds ratio for Group A relative to Group B.

GroupReports symptomDoes not report symptom
Group A892
Group B2080

The sample odds in Group A are \(8/92\), and those in Group B are \(20/80\). Thus,

$$ \mathrm{OR} = \frac{8/92}{20/80} = \frac{8 \times 80}{92 \times 20} = \frac{640}{1840} \approx 0.3478. $$

The symptom odds in Group A are about 0.348 times the odds in Group B, or about 65.2% lower: \((1-0.3478)\times100\%\approx65.2\%\). The same comparison can be reversed: the odds in Group B are \(1/0.3478\approx2.875\) times the odds in Group A. The reciprocal describes the same table with the group comparison reversed.

Worked Example: Same Odds Ratio, Different Chi-Square Evidence

Consider two hypothetical 2×2 tables with the same cell proportions. In each, the first column is the outcome. The second table has ten times as many observations as the first.

TableGroupOutcomeNo outcome
1Group 14020
1Group 22020
2Group 1400200
2Group 2200200

For Table 1,

$$ \mathrm{OR}_1 = \frac{40 \times 20}{20 \times 20} = 2. $$

For Table 2,

$$ \mathrm{OR}_2 = \frac{400 \times 200}{200 \times 200} = 2. $$

The odds-ratio estimates are identical. To see why their chi-square evidence can differ, calculate the Pearson chi-square statistic for Table 1. Its row totals are 60 and 40, its column totals are 60 and 40, and its total is 100. Under independence, the expected counts are 36, 24, 24, and 16. All are comfortably above 5, and suppose observations are independent, so the usual chi-square approximation is appropriate.

$$ X^2 = \frac{(40-36)^2}{36} + \frac{(20-24)^2}{24} + \frac{(20-24)^2}{24} + \frac{(20-16)^2}{16} \approx 2.778. $$

With \(df=1\), this gives a p-value of about 0.0956. In Table 2, each observed and expected count is ten times its Table 1 value. Each chi-square contribution is therefore ten times as large, giving \(X^2\approx27.78\) and a p-value of about \(1.4\times10^{-7}\), under the same independence and expected-count conditions.

Thus, the tables have the same estimated association on the odds-ratio scale, but the larger table gives much stronger evidence against independence. A p-value does not measure the size of an effect; the odds ratio does not, by itself, report the strength of evidence against a null hypothesis.

What the Odds Ratio Tells You—and What It Does Not

An odds ratio is most informative when the outcome, the two groups, and the direction of comparison are stated explicitly. “The odds ratio is 2” is incomplete unless the reader knows which group is in the numerator and which outcome is being compared. A clear interpretation names both groups and the outcome.

The size of an odds ratio is relative to 1: values above 1 indicate higher odds in the first group, values below 1 indicate lower odds, and 1 indicates equal odds. The reciprocal gives the comparison in the opposite direction. There is no universal cutoff that makes a particular odds ratio practically important in every setting; the context and consequences of the outcome matter.

An odds ratio is an effect-size estimate from the table, while a chi-square test evaluates evidence against independence or equal distributions. A small p-value does not guarantee a large or practically important association, and a non-small p-value does not prove that the groups have identical odds. In particular, sample size affects the precision of evidence: as the third worked example shows, proportional increases in cell counts can leave the odds ratio unchanged while changing the chi-square statistic.

The calculation also needs care when a cell count is zero. If one cross-product is zero and the other is positive, the ordinary odds ratio is zero or infinite; if both are zero, the ratio is undefined. These cases do not yield an ordinary finite estimate from \(ad/bc\). Do not silently add a constant to cells to force a finite answer; how to handle sparse tables requires separate methods.

Common Mistakes

  • Confusing odds with probability. An odds ratio of 2 means twice the odds, not twice the probability. Convert each probability to odds before making that comparison.
  • Omitting the comparison direction. Swapping the groups changes the odds ratio to its reciprocal. Always say which group is being compared with which.
  • Treating the odds ratio as a significance test. The odds ratio describes the estimated association; a chi-square test and its p-value address evidence against a null hypothesis.
  • Claiming causation from an association. A 2×2 table can show differing odds, but the odds ratio alone cannot establish that group membership caused the outcome.
  • Reporting an odds ratio without the outcome. Specify the outcome and the comparison groups so the direction of the estimate can be understood.
Key takeaway: For a 2×2 table arranged with counts \(a,b\) in Group 1 and \(c,d\) in Group 2, the odds ratio for the first-column outcome is \(ad/bc\), provided the calculation is defined. Interpret it as a ratio of odds in a stated direction, and use a chi-square test separately when assessing evidence against independence.

Check Your Understanding

Use the definitions and table layout above to answer these questions.

  1. A table has \(a=24\), \(b=36\), \(c=12\), and \(d=48\). Calculate the odds ratio for the first-column outcome in Group 1 relative to Group 2.
  2. An odds ratio is 0.40 for Group A compared with Group B. Interpret its direction, and calculate the reciprocal comparison.
  3. Why does multiplying every count in a 2×2 table by 10 leave its odds ratio unchanged?
  4. Two tables have the same odds ratio, but one has ten times as many observations. Explain why their chi-square p-values need not be the same.
  5. What does an odds ratio of 1 mean for the two groups, and what does it not establish about a study’s design or causes?