In statistics theory the chi-square test statistic is calculated by considering each cell and the expected frequency is subtracted from the observed frequency after that the difference is squared, and the total is divided by the expected frequency. This is highlight that the key focus of the chi-square test is the frequencies .