A chi-square test is used to test categorical variables for normality. There are two types of chi-square tests. The first is called a goodness of fit test, and is used when one wants to see whether data from a sample is representative of the actual population. The other type of chi-square test is the test for independence. This is used when one wants to compare two categorical variables to ascertain whether they are related.