Pearson Chi-Squared Test

The Pearson \(\chi^2\) value is,

\[X^2 = \sum_{i=1}^{g} \frac{(y_i-n_i \hat{\pi}_i)^2}{n_i \hat{\pi}_i (1 - \hat{\pi}_i)}\]

where \(g\) is the number of replicate groups in the design, \(n_i\) is the number of runs, \(y_i\) is the number of successes (1s), and \(\hat{\pi}_i\) is the predicted probability in the \(i^{th}\) replicate group.

The degrees of freedom for the test is the number of replicate groups minus the number of parameters \(p\) in the model, \(df = g - p\).

There is evidence of poor fit if the \(\chi^2\) value per degree of freedom, \(X^2/df = X^2/(g-p)\), differs significantly from 1 or the p-value is less than the \(\alpha\)-risk.

If the design contains few replicates use the Hosmer-Lemeshow test instead.

References

  • Douglas C. Montgomery, Elizabeth A. Peck, and . Geoffrey Vining. Introduction to Linear Regression Analysis. Wiley, 5th edition, 2012.