Suppose we want to explain a variable $Y$ with the variable $X$ via a linear model $Y= aX+ b +\epsilon$.
If $X$ and $Y$ are positively correlated, does that mean that the slope of the linear model will automatically be positive ?
Suppose we want to explain a variable $Y$ with the variable $X$ via a linear model $Y= aX+ b +\epsilon$.
If $X$ and $Y$ are positively correlated, does that mean that the slope of the linear model will automatically be positive ?
Yes, the slope and the correlation coefficient always share the same sign.
Note that the correlation coefficient can be formulated as
$$r=\frac{\sqrt{\sum_{i=1}^n(x_i−\bar{x})^2}}{\sqrt{\sum_{i=1}^n(y_i−\bar{y})^2}}\cdot \beta_1$$
where $\beta_1$ is the estimated slope of the regression line.