Interactive demo · Probability and Statistical Inference · Chapter 15

The odds ratio and its interval

For a 2×2 table the odds ratio ψ̂ = X00X11/(X01X10) measures how strongly the two binary variables are associated (ψ = 1 means independence). The delta method gives the standard error of its logarithm, γ̂ = log ψ̂: the square root of 1/X00 + 1/X01 + 1/X10 + 1/X11. There are two ways to turn this into an interval for ψ: symmetric around ψ̂ on the original scale, or symmetric around γ̂ on the log scale and then exponentiated. Type a table (or pick a preset) and compare them. The two lower panels answer "how often would each interval contain the truth?" exactly: they take the observed proportions as the true cell probabilities, list every table of size n that could be drawn, and add up the multinomial probabilities, with no simulation.

The table

Column 0Column 1
Row 0
Row 1

Confidence level

Size n of the repeated studies

Try these

ψ̂ = (X00X11)/(X01X10) compares the odds of column 0 in row 0 with those in row 1. Wald test: W = γ̂/se. Intervals: (A) exp(γ̂ ± z se), equation (15.10); (B) ψ̂ ± z ψ̂ se; (C) as (A) with 1/2 added to every cell, the estimator (15.9). When a cell is 0, ψ̂ is 0 or ∞ and only (C) exists; in the coverage calculation such tables count as misses for (A) and (B). The "true" cell probabilities of the lower panels are the observed proportions (with 1/2 added to every cell if one of them is 0), and T and U are the likelihood ratio and Pearson statistics (15.4) and (15.5).

In the lecture notes