The Chi-square test examines variations between categorical variables in a random sample to ascertain if the predicted and actual findings are well-fitted. The core idea behind the test is to compare the observed values in your data to the values that would be expected if the null hypothesis were correct.