# Correlation when one variable has both positive and negative values

This is probably ridiculously simple but because I have to include the word 'negative' in my searches I'm constantly finding only posts and websites that discuss negative correlation which isn't what I'm stuck on.

Essentially, I have two variables and want to explore their correlation. As one is ordinal I'll be using Spearman's rank order correlation. The other variable was originally test scores (0-100) but they were transformed (I don't know the procedure involved; the data is supplied from a large dataset) to account for the fact that some test items were harder than others. The transformation created logits (don't understand this) where the scores are now ranging from -3 to +2.

What I'm not sure about is whether I can run a correlation using one variable that includes both positive and negative values?

• The logit transformation is a means of scaling data on a $(0,1)$ interval to $(-\infty, \infty)$. It is defined as the log-odds: $\mathrm{log}(\frac{p}{1-p})$. So for example a test score of 80 would be rescaled to odds first ($\frac{.8}{1-.8} = 4$) and then the log taken, resulting an empirical logit ($1.38$). Note that a linear relationship (e.g, if you were to use Pearson's correlation) to the logit does not necessarily imply a linear relationship to the test score. – Dalton Hance Jul 26 '16 at 22:50
• Ah ok that makes sense - I don't understand it to the level of doing it but that explanation helps! So because two people may get say 80% correct in the test, but they differed as to the difficulty of the questions they got correct, the logit helps to workout that someone getting 80% correct who got the harder questions correct (but easier ones incorrect) has more 'aptitude' (or whatever construct is being measured) than the other person who also got 80% correct but didn't get the harder ones correct. – SwingingStrawberry Jul 26 '16 at 23:26
• No. It's a simple mathematical transformation. Two scores of 80% (which is represented as decimal 0.8) will result in the exact same empirical logit of 1.38. It's just math. There is no implied model or sense of harder or easier questions. – Dalton Hance Jul 27 '16 at 15:18
• Thanks Dalton - I still don't fully understand but I think that's due to my own shortcomings with regards to statistical understanding; my thinking was based on the data being supplied coming with notes stating the logit adjusted the percentage scores using question difficulty and discrimination for each item. – SwingingStrawberry Jul 28 '16 at 15:44
• Note that using logit rather than original scores will change the Pearson but not the Spearman correlation. To help understand what the transformation is doing, and in any case, never work with a correlation without looking at the corresponding scatter plot. – Nick Cox Aug 11 '16 at 16:59