By Anthony M. Wanjohi Chi-square is used either to analyze whether a frequency distribution for a categorical variable, say sex is consistent with expectations (a goodness of fit test), OR whether two categorical variables are significantly associated with each other (a test for independence). Chi square test for independence is used to test two categorical…