AI Glossary / Statistics and probability / Intermediate
Yates' correction for continuity
Definition
Yates' correction for continuity is an adjustment commonly associated with Pearson's chi-square test for a two-by-two contingency table. It reduces the distance between observed and expected counts before calculating the statistic, recognizing that integer-valued counts are being compared with a continuous reference distribution. The corrected statistic is generally smaller and its approximate p-value larger.
What it means
A two-by-two table can describe two groups and two outcomes, such as whether users completed a task. Pearson's test compares the observed counts with counts expected under independence. The chi-square reference is continuous, but actual table counts move in discrete steps.
The continuity correction modifies that approximation. It does not change the recorded observations, correct faulty data or remove bias in how participants were selected. It is also not an adjustment for testing many hypotheses. The choice between corrected, uncorrected and other methods should follow the analysis plan and sampling situation rather than the most appealing p-value.
How it works
Compute expected counts as row total × column total / grand total. The uncorrected Pearson statistic sums (O − E)²/E across the four cells. In the conventional modern implementation described here, replace each absolute difference |O − E| by max(0, |O − E| − 0.5), then square, divide by E and sum.
Compare the corrected statistic with a chi-square distribution having one degree of freedom. The zero floor prevents a correction from moving an observed count beyond its expectation. The resulting p-value remains an approximation. Independence of the observations and the relevance of the table's sampling model still require assessment.
Three practical examples
1. Interface testing: An analyst compares completion and noncompletion counts for two independently assigned interface groups. The report states whether continuity correction was used so another analyst can reproduce the test.
2. Quality review: A team compares pass/fail counts across two production conditions. It checks the sampling structure and expected counts before choosing an inference method, rather than assuming the correction fixes every small-sample problem.
3. Research literacy: A reader sees different p-values from two software tools for the same table. Checking the continuity-correction setting can explain the difference without assuming that either tool misread the counts.
Think of it this way
Think of comparing a staircase with a smooth ramp. The underlying counts lie on the steps, while the reference distribution uses the ramp. A continuity adjustment tries to make that comparison less abrupt. It does not rebuild the staircase, change the observed totals or guarantee that the ramp is the right approximation in every setting.
Worked example
Use an original table with group A containing 13 successes and seven failures, and group B containing seven successes and 13 failures. Each group has 20 observations; each outcome column also totals 20. The grand total is 40, so every expected count is 20 × 20/40 = 10.
Every absolute observed-minus-expected difference is three. The uncorrected statistic is 4 × 3²/10 = 3.6. With the stated correction, each difference becomes 2.5, giving 4 × 2.5²/10 = 2.5.
Using a one-degree-of-freedom chi-square reference, the uncorrected p-value is approximately 0.0578 and the corrected p-value approximately 0.1138. The observed success proportions remain 65% and 35%, a difference of 30 percentage points. The correction changes the test approximation, not that observed difference. Neither p-value is the probability that the two population success rates are equal.
Illustrative case study
In this fictional case, Clover Tools evaluates two onboarding screens. Two analysts obtain different chi-square p-values from identical data. They compare their software settings and find that one used the continuity correction and the other did not.
The team documents the planned method, reports the observed proportions and relevant uncertainty, and explains the sensitivity to the testing choice. It does not switch methods solely to cross a significance threshold. If the sample design or sparsity calls the approximation into question, the team considers a method suited to that situation and records why.
Common misconceptions and mistakes
The correction does not turn Pearson's chi-square procedure into Fisher's exact test. It also does not make dependent observations independent. Paired binary outcomes, repeated users and clustered sampling need analyses that respect those structures.
Do not subtract 0.5 from the final chi-square statistic or from every raw count. The adjustment applies to cell deviations in the statistic. In many settings it is conservative, potentially reducing power; it is not universally preferred. “Small sample” is not a sufficient description of the problem because expected counts, margins and the sampling design also matter.
Business use
Understanding Yates' correction helps teams reconcile legacy analyses, software defaults and differing statistical reports. Its practical value is transparent interpretation of a specific test, not the creation of a general-purpose data-cleaning step.
A reproducible business report should retain the full table, expected counts, test name, correction setting and effect summary. Explain the practical meaning of the observed proportions separately from the test result. Decisions about a product or process should not depend solely on whether one optional approximation pushes a p-value just above or below a conventional threshold.
People also ask
Does the correction alter the sample size?
No. It changes the statistic calculated from the table, not the underlying number of observations.
Is it applied automatically to every contingency table?
No. The familiar form is for the two-by-two, one-degree-of-freedom setting; software behavior should be checked.
Does a larger corrected p-value prove no association?
No. Non-rejection is not proof of equality or independence.
Check your understanding
What is corrected in the example?
Answer: Each absolute cell deviation is reduced from three to 2.5 before squaring.
Do the success rates change after correction?
Answer: No. They remain 13/20 and 7/20.
Would the correction account for the same person appearing in both groups?
Answer: No. That would require attention to the paired or dependent design.
Related terms
- Contingency table
- Expected frequencies
- Continuity correction
- Independence
- P-value
- Pearson chi-square test
- expected frequency
- Fisher's exact test
- statistical power
Learn next
Next, calculate expected counts and both test statistics for a small table. Compare their interpretation with an appropriate exact or resampling method. Study paired binary analysis separately so that the table's appearance does not obscure the actual observation design.
More in Statistics and probability
- X-bar-R chart - An X-bar-R chart is a paired statistical process-control display that monitors subgroup averages and subgroup ranges over time.
- X-bar-S chart - An X-bar-S chart is a paired process-control display that monitors subgroup means and subgroup standard deviations over time.
- Yates analysis - Yates analysis is a structured calculation of factor and interaction estimates for suitable factorial experiments, especially two-level designs.
- Yates's correction for continuity - Yates's correction for continuity is the conventional half-unit adjustment to cell deviations in a two-by-two Pearson chi-square test.
- Yoked control design - A yoked control design links the experiences of a control participant to those generated by another participant or experimental unit.
- Youden's J statistic - Youden's J statistic summarizes a binary decision rule as sensitivity plus specificity minus one.
Sources
R's chisq.test documentation specifies the half-unit adjustment and its limit at the expected value: https://stat.ethz.ch/R-manual/R-devel/library/stats/html/chisq.test.html
SciPy's chi2_contingency documentation explains the one-degree-of-freedom correction setting: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.contingency.chi2_contingency.html
The table, independently calculated statistics and Clover Tools case are original illustrations. Both supplied spelling variants are retained for editorial cross-reference.
Previous: Yates analysis Next: Yates's correction for continuity