I'm asked to explore the correlation between a quantitative variable (Interest rate) and categorical variabels (Such as State of Residence, Employment length (<1 years, 1-2 years, ..., >=10years), etc). For binary categorical variables, it makes sense to assign a numerical value such as (-1,1) or (0,1) and then perform the correlation computation.

what methods are there to find correlation when there are multiple values for the categorical variable?


You have to treat each level of the categorical variable as a separate variable.

The simplest way to do this would be to use a single regression model, and the coefficients from that model. So if you have variable X with k levels, and y as your continuous variable, you can look at this model:


where the $\beta$s will be the average relationship between each level of the qualitative variable and the continuous variable. Keep in mind, this model has the intercept suppressed, so you get all levels. If you include an intercept, you must omit one of the levels, in which case the coefficients would be the difference between the given level and the omitted level. This is a simple way to compute the relationships and account for all the levels of the categorical variable simultaneously.

BTW, if you are just doing correlations, you technically want to calculate a point-biserial correlation for this- that is between a continuous variable and a binary variable. Alternatively, you could perform a simple t-test and test the difference in means. Also note that these methods assume the continuous variable is normally distributed.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.