Use the chi-square test of goodness-of-fit when you have one nominal variable with two or more values. You compare the observed counts of observations in each category with the expected counts, which ...Use the chi-square test of goodness-of-fit when you have one nominal variable with two or more values. You compare the observed counts of observations in each category with the expected counts, which you calculate using some kind of theoretical expectation. If the expected number of observations in any category is too small, the chi-square test may give inaccurate results, and you should use an exact test instead.