Calculator: Pearson chi-square for a 2×2 table
Enter the labelled inputs to calculate: Value χ²; Count N.
Enter a finite value within the formula’s domain and supported numeric range.
How the calculation works
χ²=N(ad−bc)²/[(a+b)(c+d)(a+c)(b+d)]
Paired lists must have equal lengths. Variances use sample standard deviations where labelled. Probabilities must be nonnegative and sum to one; information is in bits, with zero-mass terms omitted. Pearson statistics use no continuity correction. Wilson uses the supplied normal critical value z.
Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.
Frequently asked questions
How is the result calculated?
χ²=N(ad−bc)²/[(a+b)(c+d)(a+c)(b+d)]
What assumptions apply?
Paired lists must have equal lengths. Variances use sample standard deviations where labelled. Probabilities must be nonnegative and sum to one; information is in bits, with zero-mass terms omitted. Pearson statistics use no continuity correction. Wilson uses the supplied normal critical value z.
How precise are the displayed results?
Numerical results show up to ten significant digits. Rounding does not improve the accuracy of the input measurements or the model. Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.
How we verified this calculator
The calculator is checked against 3 reference cases computed independently of its code. Last passed: .
| # | Inputs | Expected result |
|---|---|---|
| 1 |
Value aa = 10
Value bb = 20
Value cc = 30
Value dd = 40
|
Value χ²: 0.7936507937
Count N: 100
|
| 2 |
Value aa = 12
Value bb = 5
Value cc = 7
Value dd = 16
|
Value χ²: 6.319891801
Count N: 40
|
| 3 |
Value aa = 100
Value bb = 80
Value cc = 60
Value dd = 90
|
Value χ²: 7.926470588
Count N: 330
|