Arte SheetsLearn. Try. Understand.

Statistical & Clinical Analysis

Cornfield 2x2 Odds Ratio Quadratic Expected Cell A(psi) & Score Test Formula

Evaluate Jerome Cornfield’s (1956) noncentral hypergeometric quadratic expected cell count A(psi), conditioning variance V(A), and continuity-corrected chi-square score X^2(psi) for any hypothesized 2x2 Odds Ratio psi.

Why Cornfield’s margin-conditioned quadratic avoids Woolf’s zero-cell crash on 2x2 tables!

Woolf’s log-odds-ratio interval EXP(LN(ad/bc) +- 1.96 * SQRT(1/a + 1/b + 1/c + 1/d)) fails whenever a cell is small or zero and ignores fixed marginal totals m_1 = a + b, m_0 = c + d, n_1 = a + c, N = m_1 + m_0. Jerome Cornfield (1956, 3rd Berkeley Symposium) conditioned on fixed 2x2 margins: for any hypothesized Odds Ratio psi > 0, the expected exposed-case count A(psi) satisfies the exact quadratic (psi - 1) * A^2 - (N + (m_1 + n_1) * (psi - 1)) * A + psi * m_1 * n_1 = 0 (with A(1) = m_1 * n_1 / N)!

Once A(psi) is solved from the unique feasible quadratic root in (MAX(0, m_1 + n_1 - N), MIN(m_1, n_1)), its conditioned asymptotic variance is V(A) = 1 / (1 / A + 1 / (m_1 - A) + 1 / (n_1 - A) + 1 / (m_0 - n_1 + A)), and Cornfield’s continuity-corrected test statistic is X^2_CC(psi) = MAX(0, |a - A(psi)| - 0.5)^2 / V(A(psi)): all psi values with X^2_CC(psi) <= 3.8415 form the 95% Cornfield Confidence Interval!

Cornfield Diagnostic (a=18, b=12, c=8, d=22; OR_hat = 4.125)At Null psi = 1.00At Candidate Lower Bound psi = 1.25
Expected Exposed Cases A(psi)13.000013.8225
Conditioned Variance V(A(psi))3.68333.6947
Cornfield Continuity-Corrected X^2_CC(psi)5.4977 (Reject: > 3.8415)3.6867 (Inside 95% CI: <= 3.8415)

Cornfield Quadratic Expected Cell Count A(psi) Under Fixed 2x2 Margins

Solves the feasible quadratic root A(psi) for 2x2 counts a=B2, b=B3, c=B4, d=B5 and hypothesized Odds Ratio psi > 0 in B6 (handling psi = 1 smoothly as m_1 * n_1 / N).

=IF(OR(MIN(B2:B5) < 0, B2 + B3 <= 0, B4 + B5 <= 0, B2 + B4 <= 0, B3 + B5 <= 0, B6 <= 0), "Invalid 2x2 Marginals or psi <= 0", IF(ABS(B6 - 1) < 0.000001, ROUND((B2 + B3) * (B2 + B4) / SUM(B2:B5), 4), ROUND(((SUM(B2:B5) + (B2 + B3 + B2 + B4) * (B6 - 1)) - SQRT((SUM(B2:B5) + (B2 + B3 + B2 + B4) * (B6 - 1)) ^ 2 - 4 * (B6 - 1) * B6 * (B2 + B3) * (B2 + B4))) / (2 * (B6 - 1)), 4)))

Cornfield Continuity-Corrected Chi-Square Statistic X^2_CC(psi)

Uses live expected cell D2 = A(psi) and reciprocal variance helper D3 = V(A(psi)) to compute MAX(0, ABS(a - A) - 0.5)^2 / V(A) (values <= 3.8415 lie inside the 95% Cornfield CI).

=IF(OR(MIN(B2:B5) < 0, B6 <= 0, D3 <= 0), "Invalid 2x2 Marginals or psi <= 0", ROUND((MAX(0, ABS(B2 - D2) - 0.5) ^ 2) / D3, 4))

Try the example

Use the original values or change them to test your understanding.

Further reading