Understanding the difference between correlation and linear regression
Correlation and Linear Regression are often used together but they are not the same.
Correlation quantifies the degree to which two variables (X and Y) are related. It can be computed and interpreted for any two variables. It does not fit a line through the data points. It involves computing a correlation coefficient (r) that tells you how much one variable tends to change when the other one changes.
Linear regression finds the best line that predicts Y from X. It is usually used when X is a variable you manipulate (time, concentration, etc.)
With correlation you do not have to think about cause and effect. It does not matter which of the two variables you call “X” and which of the variables you call “Y”. You get the same correlation coefficient if you swap the two.
The decision of which variable you call “X” and which you call “Y” matters in regression. You will get a different best-fit line if you swap the two. In other words, the line that best predicts Y from X is not the same as the line that predicts X from Y (even though both lines will have the same value for r2).
In correlation both X and Y are measured. With linear regression, the X values can be measured or can be a variable controlled by the user.
Relationship between results
Correlation:
computes the value of the Pearson correlation coefficient - r