Question: how to test the difference between two categorical variables?
Answer: Chi-square Test. The Pearson's χ2 test (after Karl Pearson, 1900) is the most commonly used test for the difference in distribution of categorical variables between two or more independent groups.