# How to represent a Spearman correlation with a line?

Working in health science research. We have generated correlations between two variables. This is the amount of two proteins in the system. I wanted to make a straight line with slope, but the values of the straight lines are not consistent with the R values of the Spearman correlation test.

Indeed, the R is negative while the slope of the line is positive. Or vice versa. Or two lines are similar, but the R is totally different. It cannot be published in a newspaper. I then wonder how to represent the correlation between the two variables on the graphs and see the evolution of the point cloud?

(1 and 2 are two different populations)

Whuber: yes sorry, I expressed myself badly. We performed Spearman correlations, and we wanted to visually represent the trend of the data with a straight line. (not necessarily a non-linear line of regression). It does not matter whether the correlation is good, significant or not. Just show at a glance if there is a correlation or not.

I had in mind the correlation could be represented by a straight line. And the values of the correlation test made it possible to show scientifically that this is valid.

But with Alexis, I understand that I can't do that. And these graphs prove it, where I have negative R's with positive slopes.

I will try in log.

Is there a visual method to represent a correlation on this type of graph? Because in life sciences, a representation of the genre is often more convincing for scientific journals.

Afterwards, I am not a mathematician or a statistician, so there are a lot of gaps. And I work on the GraphPad prism software, which may have some limitations.

chrishmorris: Indeed, we have an R and not an R².

Here is the type of data we have with a spearman correlation test in the GraphPad Prism software.

• Please explain the sense in which a "straight line" might be considered "nonlinear regression." That reads like a direct contradiction. Why are you mentioning Spearman correlation, which otherwise appears unrelated to the rest of the question?
– whuber
Commented Jan 13, 2023 at 16:36
• Possibly related: stats.stackexchange.com/questions/64938/… Commented Jan 13, 2023 at 16:38
• Three quite different comments: 0. You seem to have 3 variables here 1. The graph to make sense of Spearman correlations is a plot of the ranks of two variables. 2. Regardless of P-values straight lines aren't very convincing Perhaps it would help a bit to work with log Y, depending partly on what makes sense scientifically. Commented Jan 13, 2023 at 16:44
• I want to link whuber and @NickCox's comments: While you can graph straight lines on the ranks of your data, you cannot validly represent monotonic association (i.e. what Spearman's $r_{\text{S}}$ measures) with (only) a straight line on your data (not ranks), since the are many nonlinear curves which are monotonic functions of two variables. Commented Jan 13, 2023 at 17:17
• Is the r presented Spearman's rho ? Commented Jan 13, 2023 at 20:38