# When to look at the P value of the slope and when at the P value of a cor.test()

This question was edited to clairify my question, for the old question see the edit log
I found this about regression and correlation:

Regression is different from correlation because it try to put variables into equation and thus explain causal relationship between them, for example the most simple linear equation is written : Y=aX+b

Based on the infromation mentioned here:

However such results do not allow any causal explanation of the effect of x on y, indeed x could act on y in various way that are not always direct, all we can say from the correlation is that these two variables are linked somehow, to really explain and measure causal effect of x on y we need to use regression method, which will come next.

If we plot data and it shows a clear linear trend we can test if this linear trend is significant using a correlation test (I assume), if this is the case we can apply a linear model to this and then inspect the p value of the slope to determine if the slope is probably the same as we could expect in our popultion.

I'm not sure if the above assumption is correct so I'm wondering what the p value of the correlation test tells us and what the P value of the slope tells us?

• Short answer is always to follow the regression. It's more flexible if you change the model whereas the correlation answers one question only. The linear fit looks plausible for the data but an exponential fit also works well (try it) and doesn't have the downside of going negative at some point. (Still, if biological plausibility is a goal here, as it should be, it also seems possible that too much acid would just kill the fungus, so growth might stop any way.) – Nick Cox Jan 18 '17 at 14:17
• What could "slope" possibly mean without an assumption of a linear relationship in the first place?? – whuber Jan 18 '17 at 14:22
• The regression is the analysis to follow. It's just a coincidence here that regression and correlation overlap so much. If you decided that the relationship was curved, and here there is a serious case for that, then the correlation is immediately secondary to the regression and not directly pertinent. – Nick Cox Jan 18 '17 at 14:24
• The p-value tells you whether it's statistically away from zero. Therefore, whether the coefficient is useful or not in the regression. – SmallChess Jan 18 '17 at 14:31
• @Stefan One reason it might surprise you is that the assumptions underlying a correlation test and a regression slope test are different--so even when we understand that the correlation and slope are really measuring the same thing, why should their p-values be the same? That shows how these issues go deeper than simply whether $r$ and $\beta$ should be numerically equal. – whuber Jan 19 '17 at 19:04

There are different questions in this question. Neither correlation nor linear regression can prove causal relationship. But in your mind and in the model, the correlation is not directed but regression is. There is no difference in correlation, whether you think one value is the reason for the other whereas the formulation of a linear regression modell usually implies a direction. At least with ordinary least squares, it is not the same, whether you write $Y = aX+b$ or $X = cY+d$. However $cor(X,Y) = cor(Y,X)$.
Correlation and linear regression are familar, but the link is the $R^2$ value which results from linear regression and is indeed the square of the correlation coefficient $r$. You have not mentioned $R^2$ in your post so maybe this will help to get a better understanding.