Worked example
Example: Illustrative pass rates of two lines. The inputs, in the units selected above:
| Input | Value |
|---|---|
| Row 1, column 1 count | 30.000 - |
| Row 1, column 2 count | 20.000 - |
| Row 2, column 1 count | 15.000 - |
| Row 2, column 2 count | 35.000 - |
| Continuity correction | None (Pearson) |
Applying the formula below gives:
| Result | Value |
|---|---|
| Chi-square statistic (1 degree of freedom) | 9.0909 |
| p-value | 0.002569 |
| Phi coefficient | 0.30151 |
| Smallest expected count | 22.500 |
Open this example in the calculator and change any input.
Formula
\(\chi^2 = \frac{n(|ad - bc| - \delta)^2}{(a+b)(c+d)(a+c)(b+d)}, \quad p = \operatorname{erfc}\sqrt{\chi^2/2}\)
Variables
| Symbol | Meaning | SI unit |
|---|---|---|
| \(a\) | Row 1, column 1 count | - |
| \(b\) | Row 1, column 2 count | - |
| \(c\) | Row 2, column 1 count | - |
| \(d\) | Row 2, column 2 count | - |
| \(\text{Yates}\) | Continuity correction | - |
| \(\chi^2\) | Chi-square statistic (1 degree of freedom) | - |
| \(p\) | p-value | - |
| \(\phi\) | Phi coefficient | - |
| \(E_{min}\) | Smallest expected count | - |
Method and standards
Chi-square test.
Where it is used
- Comparing pass rates, failure rates or treatments.
- Quality and reliability data.
Common mistakes
- Using it with expected counts below 5.
- Entering percentages instead of counts.
Assumptions and limits
- Independent observations; counts, not proportions; one degree of freedom.
References
- Pearson chi-square test of independence
Questions and answers
When should the Yates correction be used?
It makes the test more conservative for small counts; many statisticians now prefer no correction, or Fisher's exact test when counts are small.
What does the p-value mean?
The probability of a table at least this lopsided if the two variables were independent.
What do the defaults represent?
An illustrative trial: 30 of 50 parts from line A pass and 15 of 50 from line B.
Method and article reviewed by FireCAD engineering on 17 November 2026. Every result is checked against an independent calculation on each release: how we verify our calculators.
Sources
Montgomery and Runger, Applied Statistics and Probability for Engineers, 6th ed. (Wiley, 2014)