Hi everybody !

I need some help.

I have two variables, one with negative and positive values (let's call it A), and the other with solely positive values (let's call it B). I would want to do the correlation between these two variables. These values are those of individuals (one value per individual). I would like to know if this makes sense to correlate directly with the two variables, or to look the correlation between A and B in two groups : one where individuals have negative values for A and the other group where individuals have positive values for A.

Thank you for your help !

Have a good day


Active Member
I can answer your question, instead I will suggest a test. Build 2 perfect correlate set of data, one only positive and one half positive and half negative and see what result correlation you get...
If I take one vector x=(1,2,3,4,5,6) and another y=(1,2,3,-4,-5,-6) the correlation is -0.85. It means that when the values of x increase, the values of y decrease


Active Member
This is good. I prefer going to the edge.
You should try(1,2,3,4,5,6) and(-3,-2,-1,0,1,2)
And compare it to (1,2,3,4,5,6) and (7,8,9,10,11,12)
Last edited:
Yes, I understand, the correlation is 1 for the two examples. It's the association direction of two vectors which is important, not the value or the value sign