0

I have a general statistical question. I have a categorical variable and a numerical variable; is it okay to use the pearson correlation coefficient to determine the relationship between the both?

Regards

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467

1 Answers1

0

Is your categorical variable ordinal (the order matters, such as "low," "medium," and "high). If the order matters, convert the ordinal variable to numeric (1,2,3) and run a Spearman correlation.

If the order doesn't matter, correlation is not defined for your problem.

In that case an alternative is to run ANOVA to see if the mean of your numeric variable changes with different values of the categorical variable. That doesn't give you a correlation, but it tells you if there's a relationship.