Skip to main content
v2026.11,858 entries · CC-BY 4.0

Continuity Corrections: Formula, Worked Example, Yates and R

Continuity corrections explained: the ±0.5 rules for binomial-to-normal approximation, Yates’ correction, worked arithmetic, and R/Python/Excel code.

Written and maintained by CASRAI Editorial Board

Last updated

A continuity correction is a small adjustment of 0.5 that makes a continuous distribution, usually the normal, a fairer stand-in for a discrete one, usually the binomial. It appears in two places that look different but use the same idea: the ±0.5 cutoffs when a binomial probability is approximated with a normal curve, and Yates’ correction for 2×2 contingency tables. This guide puts both side by side, with the arithmetic and the exact behaviour of R and SciPy.

Definition in one paragraph

A continuity correction replaces a whole-number cutoff with a cutoff half a unit away, so that the area under a smooth curve matches the probability of a discrete count. Lane’s Online Statistics Education text puts the central point this way: the normal approximation of the probability of getting exactly 5 successes is the area between 4.5 and 5.5. Each integer outcome “owns” the interval from half a unit below to half a unit above it, and the correction simply respects that.

Rules: which way does the 0.5 go?

For a binomial count X approximated by a normal curve, the McMaster University Statistics 2MA3 notes give the rule for each type of probability statement. Always move the cutoff outward, so that the whole interval belonging to the boundary integer is included.

Probability wanted Normal area to compute
P(X ≤ a) from −∞ up to a + 0.5
P(X ≥ a) from a − 0.5 up to +∞
P(X = a) from a − 0.5 to a + 0.5

A “between” statement, P(a ≤ X ≤ b), uses a − 0.5 to b + 0.5 by the same logic. Strict inequalities such as P(X < a) are first rewritten as P(X ≤ a − 1).

Formula with every symbol explained

For a binomial count with n trials and success probability p, the approximating normal has mean μ = np and standard deviation σ = √(np(1 − p)). The corrected z-score for an upper-tail question is

z = (x − 0.5 − μ) / σ

  • x: the whole-number count at the boundary (for P(X ≥ x)).
  • 0.5: the continuity correction itself, subtracted for a “greater than or equal” statement and added (x + 0.5) for “less than or equal”.
  • μ (mean): np, the expected number of successes.
  • σ (standard deviation): √(np(1 − p)).

Lane’s n = 8, p = 0.6 example uses exactly this form: z = (X − 0.5 − M) / sd.

Worked example: uncorrected, corrected and exact side by side

Take a binomial with n = 10 and p = 0.5. Then μ = 5 and σ = √2.5 = 1.5811. The McMaster notes use this case for P(X = 3). All values below were recomputed.

P(X = 3)

  • Exact binomial: C(10,3) × 0.510 = 120 / 1024 = 0.1172.
  • Uncorrected normal, area from 2 to 3: z = (2 − 5)/1.5811 = −1.897 and z = (3 − 5)/1.5811 = −1.265, giving 0.0741. Area from 3 to 4 gives 0.1606. Neither is close, and which one you pick is arbitrary.
  • Corrected, area from 2.5 to 3.5: z = (2.5 − 5)/1.5811 = −1.581 and z = (3.5 − 5)/1.5811 = −0.9487. Φ(−0.9487) − Φ(−1.581) = 0.1714 − 0.0569 = 0.1145.

P(X ≤ 3) and P(X ≥ 3)

  • P(X ≤ 3): exact 0.1719; corrected normal Φ((3.5 − 5)/1.5811) = Φ(−0.9487) = 0.1714; uncorrected Φ(−1.265) = 0.1030.
  • P(X ≥ 3): exact 0.9453; corrected 1 − Φ(−1.581) = 0.9431; uncorrected 1 − Φ(−1.265) = 0.8970.

A second case from Lane: n = 8, p = 0.6, so μ = 4.8 and σ = 1.386. For P(X ≥ 7), z = (7 − 0.5 − 4.8) / 1.386 = 1.227. The normal approximation gives 0.1099 against an exact binomial value of 0.1064 (exact: P(7) + P(8) = 0.0896 + 0.0168).

Interpretation: reading the results

Result in the example What it shows
Corrected 0.1145 vs exact 0.1172 for P(X = 3) The corrected cutoffs recover almost all of the exact probability.
Uncorrected 0.0741 or 0.1606 for the same event Using the bare integer as a cutoff can miss by a large margin, and the choice of side changes the answer.
Corrected 0.1714 vs exact 0.1719 for P(X ≤ 3) For cumulative statements the corrected value is very close to exact here.
Uncorrected 0.1030 vs exact 0.1719 for P(X ≤ 3) Leaving the correction out understates a tail that includes the boundary value.

Yates’ continuity correction for 2×2 tables

The same half-unit idea is applied to a chi-square test of independence on a 2×2 table. Observed counts are whole numbers but the chi-square distribution is continuous, so the correction pulls every observed count 0.5 toward its expected count. The SciPy documentation for scipy.stats.chi2_contingency says it exactly: if the correction is on and the degrees of freedom is 1, Yates’ correction is applied, and “the effect of the correction is to adjust each observed value by 0.5 towards the corresponding expected value.” R’s chisq.test documentation describes it as one half subtracted from all |O − E| differences.

Worked 2×2 example

Observed counts: row 1 = 18 and 7; row 2 = 10 and 15. Row totals are 25 and 25, column totals 28 and 22, N = 50. Expected counts: 25 × 28 / 50 = 14 and 25 × 22 / 50 = 11, in both rows. Every |O − E| = 4.

  • Uncorrected: χ² = 2 × (4²/14 + 4²/11) = 2 × (1.1429 + 1.4545) = 5.195, df = 1, p = .0227.
  • Corrected: |O − E| becomes 3.5, so χ² = 2 × (3.5²/14 + 3.5²/11) = 2 × (0.8750 + 1.1136) = 3.977, p = .0461.

The correction moves p from .023 to .046, which is the right direction for a small table: the uncorrected statistic is the more liberal one. A result near .05 can change sides, so state which version you used.

Assumptions and common mistakes

  • Applying it to the wrong table. R states that in chisq.test the continuity correction is only used in the 2-by-2 case, and SciPy applies it only when degrees of freedom equal 1. Larger tables are never corrected.
  • Assuming the correction is always applied. In R, correct = TRUE is the default, but “the correction will not be bigger than the differences themselves”, and no correction is done if simulate.p.value = TRUE.
  • Treating prop.test like chisq.test. R’s prop.test applies Yates’ correction “only if it does not exceed the difference of the sample proportions in absolute value”.
  • Moving the 0.5 the wrong way. For P(X ≤ a) add 0.5; for P(X ≥ a) subtract 0.5. Check the direction against the table of rules above.
  • Forgetting that an exact calculation exists. For a binomial count, software returns the exact probability directly. See the binomial test guide; the normal approximation with correction is a shortcut, not a requirement.

How to report it

Report the test statistic, degrees of freedom, sample size and exact p, and say whether the correction was applied, because software defaults differ. An APA-style line for the 2×2 example reads:

A chi-square test of independence with Yates’ continuity correction showed an association, χ²(1, N = 50) = 3.98, p = .046.

For the uncorrected version, drop the phrase and report χ²(1, N = 50) = 5.19, p = .023. Our chi-square test guide covers the full reporting format and effect sizes, and chi-squared examples works more tables.

How to calculate it in Excel, R or Python

Excel

Exact:     =BINOM.DIST(3, 10, 0.5, TRUE)                        -> 0.1719
Corrected: =NORM.DIST(3.5, 10*0.5, SQRT(10*0.5*0.5), TRUE)    -> 0.1714
Uncorrected: =NORM.DIST(3, 10*0.5, SQRT(10*0.5*0.5), TRUE)    -> 0.1030

R

pbinom(3, 10, 0.5)                  # exact, 0.1719
pnorm(3.5, 5, sqrt(2.5))            # corrected, 0.1714
tab <- matrix(c(18, 10, 7, 15), nrow = 2)
chisq.test(tab)                     # Yates applied by default: X-squared = 3.977
chisq.test(tab, correct = FALSE)    # X-squared = 5.195

Python

from scipy.stats import binom, norm, chi2_contingency
binom.cdf(3, 10, 0.5)               # exact, 0.1719
norm.cdf(3.5, 5, 2.5**0.5)          # corrected, 0.1714
t = [[18, 7], [10, 15]]
chi2_contingency(t)[0]                      # correction=True default, 3.977
chi2_contingency(t, correction=False)[0]    # 5.195

For difference-of-proportions questions see the two-proportion z-test, and for running these tests in R see hypothesis testing with R. Interval estimates for a single proportion are in confidence interval for a proportion.

FAQ

What is a continuity correction?

A 0.5 adjustment to a cutoff so that a continuous curve approximates a discrete distribution. A count of 5 is treated as the interval from 4.5 to 5.5.

When do I add 0.5 and when do I subtract it?

Add it for “less than or equal” (P(X ≤ a) uses a + 0.5) and subtract it for “greater than or equal” (P(X ≥ a) uses a − 0.5). For an exact value use a − 0.5 to a + 0.5.

What is Yates’ correction?

The continuity correction applied to a 2×2 chi-square test: each observed count is moved 0.5 toward its expected count before the statistic is computed.

Does R apply it automatically?

Yes for 2-by-2 tables in chisq.test (default correct = TRUE) and for prop.test where possible, in both cases capped so it never exceeds the differences themselves.

Do I still need it if software can compute the exact binomial?

For binomial probabilities, no: the exact calculation is available directly. The correction mainly matters when you work by hand, in teaching settings, or when you need to know what a package is doing for a 2×2 table.

Sources

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Continuity Corrections: Formula, Worked Example, Yates and R

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Ask CASRAI · Regulatory Radar

Research-admin question? Get an answer that links its sources.

An AI assistant specialized in research administration. Every answer links its sources to check before you act. 2 questions free, no account. $29/month after.

  • Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.
  • Every answer numbers its sources and links each one, so you can check the source yourself.