# Correlation between ordinal and average values

I'm trying to understand whether the number of words used to title a problem are related to the time used to solve that problem. In order to do this, I have derived two vectors from my data-set, one vector contains values from 1 to 7 representing the number of words used to described a problem, the other vector contains the average time values of all the problems defined with a given number of words.

words                    1     2     3     4      5    6     7
avg.time to solve (hrs) 450.3 510.1 560.2 631.9 720.4 706.6 690.8


Can I calculate the correlation between the number of words and the average values using the Spearman's rho? Is it correct?

Any reference is welcome

• "number of words" would appear to be a count (seemingly at least interval, possibly ratio), rather than ordinal. – Glen_b -Reinstate Monica Jan 13 '15 at 11:55
• Agree with @Glen_b here, the 'number of words' variable is clearly not just ordinal given that 4 words really are twice as many words as 2 words. You may want to be more precise and just model the number of characters and the associated answers without taking averages and then (assuming a linear relationship, although this can be tested), you could use the more classic Pearson's and be more accurate with your proposed relationship. That said, Spearman's rho is a perfectly acceptable method here too. – Mensen Jan 13 '15 at 12:09
• thanks for answering. However I don't understand the threats about calculating the correlation on average values, could you explain me a bit more why is better to avoid working with average values? – user2314405 Jan 13 '15 at 12:18
• A relevant question is when the mean is a poor summary statistic of a given sample. For example, mean may be of limited use if the distribution is skewed. Also, even if the distribution is perfectly symmetric, using all observation in place of means would yield a different answer; the observations far away from the mean would have a larger effective weight than those close to the mean. But if you want to check the strength of linear relationship between $words$ and $avg.time$ you may actually prefer just means (and thus in a way equal weights within each group) over all observations. – Richard Hardy Jan 13 '15 at 14:18