Chi-square Test of Independence

Tests whether the rows and the columns of a two-row contingency table are related. The expected count of each cell is row total × column total ÷ grand total, and χ² = Σ(observed − expected)² ÷ expected. The degrees of freedom are the number of columns − 1. Any number of columns is allowed.