# Correlation between continuous variable and nominal variable [duplicate]

I have a data set with the amount of bicycle accidents and the year in which the bicycle accident occurred. I would like to see if there is a significant increase in the amount of bicycle accident per years and by which amount.

I am doubting between Pearson's correlation and Spearman's Correlation. (Or should I use a linear regression analysis?)

• There are many related questions asked before on this site, for instance here, here, and here. However, I am not sure why you think one of these variables is nominal. Mar 2, 2017 at 10:20

as far as I can see your variables are both metric, therefore you could use a simple regression analysis (you can do a scatterplot, to see what kind of regression is suitable, f.e. a linear one).

The advantage of a (linear) regression is, that it provides a better interpretation of "the amount of bicycle-accident increase", because you can report the slope and say: "the expected amount of accidents increases about (the slope-coefficient) per year".

Regression analysis and correlation solve two very different problem, so what to do depends on what you want to get from the data.

If you're interested in only a number that describes the relationship, you may want to use Pearson (for linear) or Spearman (for monotonic).

If you want a dependent variable and interested in how the variables interact, you should use regression. There's no mention the relationship is linear, so pick the most appropriate regression analysis.