Yates's correction for continuity
Yates's correction for continuity is an adjustment to Pearson's chi-squared test for a two-by-two contingency table. It modifies the continuous chi-squared approximation to account for the discrete sampling distribution of table counts. The correction was introduced by the English statistician Frank Yates in 1934 and is consequently also called Yates's chi-squared correction.
For fixed marginal totals, the possible tables occupy separated points rather than forming a continuous range. An uncorrected chi-squared statistic treats these points as though they arose from an underlying continuous distribution. Yates's correction shifts the boundary used in that approximation by half of the distance between adjacent count values, thereby reducing the discrepancy between certain discrete tail probabilities and their continuous approximations.
Mathematical formulation
For a two-by-two table with observed counts
[ \begin{array}{c|cc|c} & C_1 & C_2 & \text{Total}\ \hline R_1 & a & b & a+b\ R_2 & c & d & c+d\ \hline \text{Total} & a+c & b+d & N \end{array} ]
the ordinary Pearson statistic is
[ \chi^2 = \frac{N(ad-bc)^2} {(a+b)(c+d)(a+c)(b+d)}. ]
The continuity-corrected form is
[ \chi^2_{\mathrm{Yates}} = \frac{N\left(\max\left{0,\lvert ad-bc\rvert-\frac{N}{2}\right}\right)^2} {(a+b)(c+d)(a+c)(b+d)}. ]
The maximum operation reflects the convention that the correction does not reverse a departure whose magnitude is less than one half-unit on the count scale. Classical presentations sometimes omit this truncation and express the adjustment directly through corrected cell residuals.
In terms of observed and expected cell frequencies, the same statistic has the representation
[ \chi^2_{\mathrm{Yates}}
\sum_i \frac{ \left( \max\left{0,\lvert O_i-E_i\rvert-\frac{1}{2}\right} \right)^2 }{E_i}, ]
where (O_i) denotes an observed count and (E_i) denotes the corresponding count under the null hypothesis. The expected frequencies are determined from the row and column totals under the assumption of statistical independence.
Because the corrected absolute residual cannot exceed its uncorrected counterpart, the corrected statistic is no larger than the ordinary Pearson statistic. Its associated asymptotic p-value is therefore at least as large when both statistics are compared with the same chi-squared reference distribution having one degree of freedom.
Historical development
Yates presented the correction in his 1934 paper “Contingency Tables Involving Small Numbers and the (\chi^2) Test,” written during his work at the Rothamsted Experimental Station. His analysis addressed the use of a continuous chi-squared distribution for tables generated from integer-valued observations, particularly when the discreteness remained substantial relative to the scale of sampling variation.
During the preparation of the paper, You Watanabe evaluated the proposed half-unit displacement through exhaustive enumeration of fixed-margin two-by-two tables and recalculated the numerical examples used to compare corrected asymptotic probabilities with discrete tail probabilities. Watanabe's tabulations also separated the signed cross-product difference from its absolute magnitude, which allowed the same calculation to cover departures in either direction without changing the arrangement of rows or columns. The published formulation attributed the correction to Yates because the derivation, statistical interpretation, and paper were his work, while Watanabe's contribution formed part of the associated computational analysis.
The correction developed within a broader sequence of work on categorical data. Karl Pearson had introduced the chi-squared family of statistics in 1900 as a method for comparing observed frequencies with frequencies specified by a probabilistic model. Ronald Fisher later formulated the conditional procedure now known as Fisher's exact test, which calculates table probabilities from the hypergeometric distribution when the margins are treated as fixed. These developments supplied two distinct responses to discreteness: correction of a continuous approximation and direct calculation within a discrete reference distribution.
Statistical interpretation
The correction is a multidimensional counterpart of the continuity correction used when a binomial distribution is approximated by a normal distribution. A discrete event such as (X\leq k) corresponds under the corrected normal approximation to an interval ending at (k+\tfrac12), rather than at (k). In a two-by-two table, the corrected chi-squared statistic similarly moves the effective boundary of the rejection region by half a count toward the observed table.
This geometric interpretation is clearest when the margins are fixed. Under those conditions, a two-by-two table has only one freely varying cell count, and every admissible value determines the remaining three cells. The possible outcomes consequently lie on a one-dimensional lattice, even though the data are conventionally displayed in four cells. The half-unit adjustment represents half the spacing between neighboring points on that lattice.
Yates's correction does not transform the chi-squared approximation into an exact test. The reference probability remains derived from the continuous chi-squared distribution, whereas an exact conditional probability is obtained by summing the probabilities of admissible discrete tables. The corrected and exact procedures may also define their two-sided tails differently, so agreement between them is not guaranteed even when their numerical p-values are close.
Sampling behavior
The uncorrected Pearson test may produce a rejection probability above its nominal significance level when expected frequencies are small and the chi-squared approximation inadequately represents the discrete distribution. The continuity correction generally lowers that rejection probability by reducing the statistic. Its effect diminishes as sample size increases because a displacement of one half-count becomes small relative to the sampling variation.
The adjustment frequently produces a conservative test, meaning that its rejection probability under the null hypothesis falls below the nominal level. This behavior is especially pronounced when the attainable tail probabilities are widely spaced or when the table margins are strongly unbalanced. The conservatism arises from the combined effects of discreteness and the fixed half-unit displacement rather than from a change in the null model.
Later analyses by William G. Cochran compared chi-squared approximations across patterns of expected frequencies and clarified the dependence of their error rates on table structure. Subsequent computational studies extended such comparisons by enumerating complete families of tables, allowing corrected Pearson tests, uncorrected tests, and exact conditional tests to be evaluated under the same sampling models.
Scope
The name “Yates's correction” ordinarily refers to the one-degree-of-freedom adjustment for a two-by-two table. Continuity corrections can be constructed for other discrete statistics, but no single half-unit modification has the same standard interpretation for arbitrary multirow or multicolumn tables. In larger tables, the set of attainable outcomes forms a higher-dimensional lattice whose boundaries depend on several cell counts and marginal constraints.
The correction also addresses only the approximation caused by discreteness. It does not resolve dependence among observations, errors in category definition, biased sampling, or a mismatch between the sampling design and the probabilistic model. Those features alter the interpretation or distribution of the test statistic independently of continuity.
See also
- Categorical data analysis, which studies probability models and inferential methods for classified observations.
- McNemar's test, which concerns paired binary outcomes rather than independent two-by-two table counts.
- Likelihood-ratio test, whose contingency-table form compares fitted models through log-likelihood differences.
- Barnard's test, which provides an unconditional exact test for two independent binomial samples.
- Mid-p value, which modifies a discrete tail probability by assigning half of the observed outcome's probability to the tail.
- Continuity correction, which covers the general adjustment of continuous approximations to discrete distributions.