# What are the possible tests for gauging the correlation between two categorical variables? [duplicate]

I have two categorical variables: Emotions {Sad, Happy, Neutral} and Psychological_state {Depression, Normal, None}.

I want to interpret the relationship between these two variables (is there a correlation between them). For instance, is there a dependence between being sad and depressed ? What is the degree of this dependency ?

Can I use Pearson correlations to test the correlation between these two categorical variables? What are the alternative solutions to interpret the relationship between categorical variables? What are the other alternatives to do this, excluding the chi-square test?

• Can you say why you don't want to use a chi-squared test, which would be the most common approach? – Ben Bolker Aug 17 '18 at 12:28
• I just want to explore the alternative ways to interpret the correlation between categorical variables other than chi-square. – Abrial Aug 17 '18 at 12:41
• Pearson/Spearman correlation won't work for categorical variables because there's no inherent ordering to the variables' values. Depending on if you encode {Sad, Happy, Neutral} as {1, 2, 3} or {3, 2, 1} or {2, 1, 3}, you may find positive, negative, or no correlation at all between your variables. You could possibly use Spearman (rank) correlation if you have ordinal variables, for example, if there's a clearly defined ordering of emotions and psychological state from most negative to most positive. – Nuclear Wang Aug 17 '18 at 13:19
• Related/duplicate questions here and here. Also check out G test and Fisher's exact test. – user20160 Aug 17 '18 at 13:24

If the sample size is small enough, Fisher's exact test is another option. Even though it's typically done for 2x2 contingency tables, it can be applied to 3x3 tables. If sample size is large, the chi-square test would be preferred.

Link to a basic Fisher's exact test calculator.