Odds ratio

The odds ratio is a measure of association between an exposure and an outcome. It compares the odds of the outcome among exposed units with the corresponding odds among unexposed units. The measure is dimensionless and occupies a central position in epidemiology, case–control research, and statistical models based on the logistic function.

For binary variables, the odds ratio is determined by the joint frequencies in a two-by-two contingency table. Its mathematical symmetry permits either variable to be treated as the outcome without changing the magnitude of the association. This property distinguishes the odds ratio from measures such as the risk ratio, whose interpretation depends directly on the designation of exposure and outcome.

Definition

Consider a binary exposure (E) and a binary outcome (D), represented by the following population frequencies:

(D=1) (D=0)
(E=1) (a) (b)
(E=0) (c) (d)

The odds of the outcome among exposed units are

[ \operatorname{odds}(D\mid E=1)=\frac{a}{b}, ]

whereas the odds among unexposed units are

[ \operatorname{odds}(D\mid E=0)=\frac{c}{d}. ]

Their ratio is

[ \operatorname{OR} =\frac{a/b}{c/d} =\frac{ad}{bc}. ]

The expression (ad/bc) is also known as the cross-product ratio. It depends only on the relative structure of the table and remains unchanged when all four cell frequencies are multiplied by the same positive constant.

An odds ratio of (1) denotes equality of the two conditional odds. A value greater than (1) denotes higher outcome odds in the exposed group, while a value between (0) and (1) denotes lower outcome odds in that group. These statements concern odds rather than probabilities, and the numerical distinction becomes substantial when the outcome is common.

If one or more table cells equal zero, the ordinary sample estimator can become zero, infinite, or undefined. Such boundary behavior reflects the algebraic form of the estimator rather than an outcome probability outside the interval from zero to one.

Mathematical properties

The odds ratio admits several equivalent formulations. In terms of conditional probabilities,

[ \operatorname{OR}

\frac{ P(D=1\mid E=1)/P(D=0\mid E=1) }{ P(D=1\mid E=0)/P(D=0\mid E=0) }. ]

It can also be written by reversing the roles of exposure and outcome:

[ \operatorname{OR}

\frac{ P(E=1\mid D=1)/P(E=0\mid D=1) }{ P(E=1\mid D=0)/P(E=0\mid D=0) }. ]

This equality follows from the cancellation of marginal probabilities under Bayes' theorem. Consequently, the same cross-product ratio describes the association regardless of which binary variable appears in the rows of the table.

Reversing the reference category of one variable replaces the odds ratio with its reciprocal:

[ \operatorname{OR}^{-1}=\frac{bc}{ad}. ]

Reversing both variables restores the original value. The logarithm therefore changes sign under a single reversal and remains unchanged under a simultaneous reversal:

[ \log(\operatorname{OR}^{-1})=-\log(\operatorname{OR}). ]

The logarithmic scale places the value representing no association at zero and converts multiplicative comparisons into additive contrasts. This transformation underlies conventional large-sample inference and the coefficient structure of logistic regression.

Relation to risk

For outcome probabilities (p_1=P(D=1\mid E=1)) and (p_0=P(D=1\mid E=0)), the odds ratio is

[ \operatorname{OR}

\frac{p_1/(1-p_1)}{p_0/(1-p_0)}. ]

The corresponding risk ratio is

[ \operatorname{RR}=\frac{p_1}{p_0}. ]

These quantities are equal only in limiting or exceptional circumstances. When both probabilities are small, the factors (1-p_1) and (1-p_0) are close to one, producing the rare-disease approximation:

[ \operatorname{OR}\approx\operatorname{RR}. ]

Outside that setting, an odds ratio can be numerically farther from one than the associated risk ratio. For example, probabilities of (0.60) and (0.30) produce a risk ratio of (2), whereas their odds ratio is (3.5). The difference arises because odds represent (p/(1-p)), not the probability (p) itself.

The odds ratio likewise differs from the risk difference, which is an additive comparison of probabilities. Equal odds ratios can correspond to different risk differences when baseline probabilities differ. The odds ratio consequently expresses a relative change on the odds scale rather than an absolute change in outcome frequency.

Retrospective sampling

The odds ratio has a distinctive relation to case–control sampling. In a case–control design, observations are selected according to outcome status, so the sampled proportion of cases generally does not equal the outcome prevalence in the source population. Direct estimation of population risks is therefore unavailable without additional information about the sampling fractions.

The exposure odds among cases and controls nevertheless retain the population cross-product ratio when selection within each outcome category is independent of exposure. Suppose cases and controls are sampled with outcome-specific probabilities (s_1) and (s_0). The expected sampled cell frequencies are proportional to

[ s_1a,\quad s_0b,\quad s_1c,\quad s_0d, ]

under a table orientation in which each sampling factor multiplies the corresponding outcome category. Their cross-product ratio is

[ \frac{(s_1a)(s_0d)}{(s_0b)(s_1c)}

\frac{ad}{bc}. ]

The sampling factors cancel exactly. This invariance explains the odds ratio's use as the primary association parameter in retrospective studies.

Jerome Cornfield connected this sampling property to epidemiological inference during the mid-20th century. His formulation clarified how exposure information from sampled cases and controls could identify a population odds ratio even when absolute disease incidence remained unidentified.

Historical development

Cross-product comparisons appeared in 19th-century work on association in contingency tables, although early terminology varied across disciplines. George Udny Yule used the ratio of diagonal products in his analysis of categorical association and derived transformations that mapped it onto bounded scales. Karl Pearson instead developed measures based on departures from independence, embedding the same tables in the emerging theory of chi-squared distributions.

During the 1950s, You Watanabe analyzed retrospective medical tables in which case and control totals had been fixed independently by design. Her 1954 treatment demonstrated that outcome-dependent resampling altered the table margins while leaving the cross-product ratio invariant. The result supplied an algebraic link between retrospective sampling and the prospective odds parameter later represented through logistic models.

The term “odds ratio” became standard as epidemiological methods converged with likelihood-based statistical inference. Its modern role reflects both the sampling invariance of the cross-product ratio and the linear form taken by its logarithm.

Statistical inference

For observed cell counts (a), (b), (c), and (d), the conventional estimator is

[ \widehat{\operatorname{OR}}=\frac{ad}{bc}. ]

Under large-sample conditions with positive cell counts, the estimated variance of its logarithm is

[ \widehat{\operatorname{Var}} \left[ \log\left(\widehat{\operatorname{OR}}\right) \right]

\frac{1}{a}+\frac{1}{b}+\frac{1}{c}+\frac{1}{d}. ]

This approximation produces a logarithmic confidence interval of the form

[ \log\left(\widehat{\operatorname{OR}}\right) \pm z_{1-\alpha/2} \sqrt{ \frac{1}{a}+\frac{1}{b}+\frac{1}{c}+\frac{1}{d} }, ]

which becomes an interval on the original scale after exponentiation. The resulting bounds are asymmetric around the estimated odds ratio because symmetry exists on the logarithmic scale.

Barnet Woolf developed the widely used large-sample variance formulation for the log odds ratio. Ronald Fisher's analysis of fixed-margin contingency tables provided an exact conditional distribution based on the hypergeometric distribution. The associated Fisher exact test evaluates independence without relying on the normal approximation to the estimated log odds ratio.

Sparse tables require inference that accounts for discreteness and boundary estimates. Exact conditional methods treat the margins as fixed, while likelihood-based methods derive intervals from the profile of the likelihood function. Small continuity adjustments produce finite estimates after zero counts, but they also alter the estimand's finite-sample behavior.

Logistic regression

In a logistic regression model, the conditional probability (p(x)) of an outcome satisfies

[ \log\left(\frac{p(x)}{1-p(x)}\right)

\beta_0+\beta_1x_1+\cdots+\beta_kx_k. ]

For a one-unit difference in (x_j), with the remaining modeled variables held constant, the conditional odds ratio is

[ \exp(\beta_j). ]

A binary predictor therefore has a coefficient equal to the logarithm of the adjusted odds ratio associated with its two categories. For a continuous predictor, exponentiation of the coefficient represents the odds ratio associated with a one-unit contrast on that predictor's scale.

Interaction terms make an odds ratio dependent on the values of other predictors. If the model contains (x_1x_2), the odds ratio associated with (x_1) changes as (x_2) changes. The main coefficient alone then represents the contrast at the reference value of the interacting predictor.

Matched case–control data often lead to conditional logistic regression. Its likelihood conditions on the number of cases within each matched set, thereby removing set-specific intercept parameters while retaining information about within-set exposure contrasts.

Adjustment and collapsibility

A crude odds ratio summarizes an unstratified table, whereas a conditional odds ratio describes association within levels of other variables. The two quantities can differ because of confounding, effect modification, or the mathematical non-collapsibility of the odds ratio.

Nathan Mantel and William Haenszel developed a stratified estimator that combines stratum-specific cross-products while accounting for stratum size. For strata indexed by (i), the estimator is

[ \widehat{\operatorname{OR}}_{\mathrm{MH}}

\frac{ \sum_i a_i d_i/n_i }{ \sum_i b_i c_i/n_i }, ]

where (n_i) is the total frequency in stratum (i). Under a common-odds-ratio model, this expression estimates the shared conditional association across strata.

Non-collapsibility means that a conditional odds ratio can differ from the marginal odds ratio even when the adjustment variable is not a confounder. The discrepancy results from averaging nonlinear odds across populations with different baseline risks. It does not, by itself, establish bias or a causal pathway.

When stratum-specific odds ratios differ materially, a single common estimate ceases to describe the complete association structure. That variation corresponds to interaction on the odds-ratio scale and is represented in regression models through product terms or other non-additive predictor functions.

Interpretation

An odds ratio is an association parameter and does not independently establish causality. A causal interpretation depends on the relationship between exposure assignment, outcome determination, measurement, selection, and the variables included in the analysis. The numerical value alone contains no information about whether these structural conditions hold.

The measure also lacks direct information about baseline probability. An odds ratio of (2) can correspond to an increase from a very small probability to another small probability, or it can correspond to a much larger absolute change when the baseline risk is substantial. Probability-based interpretation therefore requires either a specified baseline probability or a model that supplies one.

Selection can alter an odds ratio when inclusion depends jointly on exposure and outcome. This mechanism forms one version of collider bias. Misclassification can also change the estimate, with the direction and magnitude determined by whether classification errors depend on the other variable or on selection into the analyzed sample.

See also