Correlation coefficient that cares about the sign of the variables?

  Kiến thức lập trình

I have data that looks something like below. example plotI want to calculate how well A and B are correlated, but I care about the sign (positive or negative) of the two. They should ideally be in either of the diagonal quadrants. If A is positive, B should also be positive and if A is negative, B should also be negative. I guess in other words I care about the intercept of the regression line I fit to the data. Is there a statistic that captures both how well they correlate and they are also the same signs? For example, if I shift the points upward, I get the same Pearson’s r value. example plot2But I would consider this better than the previous data because at least now some of the data fall into the diagonal quadrants.

I tried pearson’s r

LEAVE A COMMENT