Is there any difference between $r^2$ and $R^2$? The correlation coefficient is usually written with a capital $R$ but sometimes not. I wonder if there really is a difference between $r^2$ and $R^2$? Can $r$ mean something else than a correlation coefficient?
 A: Notation on this matter seems to vary a little.
$R$ is used in the context of multiple correlation and is called the "multiple correlation coefficient". It is the correlation between the observed responses $Y$ and the $\hat Y$ fitted by the model. The $\hat Y$ is generally predicted from several predictor variables $X_i$, e.g. $\hat Y = \hat \beta_0 + \hat \beta_1 X_1 + \hat \beta_2 X_2$ where the intercept and slope coefficients $\hat \beta_i$ have been estimated from the data. Note that $0 \leq R \leq 1$.
The symbol $r$ is the "sample correlation coefficient" used in the bivariate case - i.e. there are two variables, $X$ and $Y$ - and it usually means the correlation between $X$ and $Y$ in your sample. You can treat this as an estimate of the correlation $\rho$ between the two variables in the wider population. To correlate two variables it is not necessary to identify which one is the predictor and which one is the response. Indeed if you found the correlation between $Y$ and $X$ it would be the same as the correlation between $X$ and $Y$, because correlation is symmetric. Note that $-1 \leq r \leq 1$ when the symbol $r$ is used this way, with $r < 0$ (negative correlation) if the two variables have a linearly decreasing relationship (as one goes up, the other tends to go down).
Where the notation becomes inconsistent is when there are two variables, $X$ and $Y$, and a simple linear regression is performed. This means identifying one variable, $Y$, as the response variable, and the other, $X$, as the predictor variable, and fitting the model $\hat Y = \hat \beta_0 + \hat \beta_1 X$. Some people also use the symbol $r$ to indicate the correlation between $Y$ and $\hat Y$ while others (for consistency with multiple regression) write $R$. Note that the correlation between observed and fitted responses is necessarily greater than or equal to zero, provided the model included an intercept term.* This is one reason I don't like the use of the symbol $r$ in this case: the correlation between $X$ and $Y$ might be negative, while the correlation between $Y$ and $\hat Y$ is positive (in fact it will simply be the modulus of the correlation between $X$ and $Y$) yet both might be written with the symbol $r$. I've seen some textbooks, and Wikipedia articles, switch almost interchangeably between the two meanings of $r$ and found it unnecessarily confusing. I prefer to use the symbol $R$ for the correlation between $Y$ and $\hat Y$ in both single and multiple regression.
In both simple and multiple regresion, then so long as there is an intercept term fitted in the model, the $R$ between $Y$ and $\hat Y$ is simply the square root of the coefficient of determination $R^2$ (often called "proportion of variance explained" or similar). In the case of simple linear regression specifically, then $R^2 = r^2$ where I am writing $r$ for the correlation between $X$ and $Y$, and $R^2$ could represent either the coefficient of determination of the regression or the square of the correlation between $Y$ and $\hat Y$. Since $-1 \leq r \leq 1$ and $0 \leq R \leq 1$, this means that $R = |r|$. So for example, if you get a correlation between $X$ and $Y$ of $r=-0.7$ then the correlation between $Y$ and the fitted $\hat Y$ from the simple linear regression $Y = \hat \beta_0 + \hat \beta_1 X$ would be $R = 0.7$ and the coefficient of determination would be $R^2 = 0.49$ i.e. almost half of variation in the response would be explained by your model.
If no intercept term was included in the model, then the symbol $R^2$ is ambiguous. It is usually intended as the coefficient of determination, but this will generally be calculated in a different way to usual, so take care when reading the output from your statistical software. Then it is no longer the same as the square of the multiple correlation $R$, nor in the bivariate case will it equal $r^2$! Indeed the coefficient of determination can even become negative when an intercept term is excluded, in which case "R-squared" is clearly a misnomer.

$(*)$ It's possible for the correlation between $y$ and $\hat y$ to become negative if no intercept term is included, e.g. $\{(0,2), (1,0), (2,1)\}$ has OLS best-fit $\hat y = 0.4x$ without an intercept, and $\text{Corr}(y, \hat y) = \text{Corr}(x,y) = -0.5$.
