# Multiple linear regression - correlation coefficient

I am searching for the formula to calculate the correlation coefficient in case of multiple linear regression.

I have 2 independent variables $$X1$$ and $$X2$$, and 1 dependent variable $$Y$$. I want to study whether there is correlation between the 3 parameters.

The model is

$$Y = aX1 + bX2 + c$$

I was able to calculate $$a$$, $$b$$, and $$c$$. Now I need to 'analyze' whether there is a correlation. In case of linear regression $$x$$ and $$y$$, the formula is:

$$r = \frac{cov(x,y)}{ \sqrt{var(x)var(y)} }$$

What is the formula in case of $$x1$$, $$x2$$, and $$y$$.

Is it called multiple correlation?

• @whuber, I have read this link stat.yale.edu/Courses/1997-98/101/linmult.htm. They seem to calculate Rsquared. But the formula is not there. Can you please give me hints or direct me? Commented Oct 8, 2015 at 15:05
• @whuber, is multiple correlation the term word I am looking for? Commented Oct 8, 2015 at 15:28
• I don't know. What are you trying to learn or characterize about the regression? "A correlation" could mean many things and can be measured in many ways: through $R^2$, through a singular value decomposition or principal components analysis, though the determinant of a covariance matrix, and many other things.
– whuber
Commented Oct 8, 2015 at 16:21
• @whuber, I want to study whether $x1$ and $x2$ can explain $y$. Commented Oct 8, 2015 at 16:24
• stats.stackexchange.com/questions/351200/… Commented Jan 9, 2020 at 15:22

Multiple correlation IS what you are looking for. It is a measure of how well the dependent variable can be predicted by a set of independent variables. The symbol is $R$ and it should be $R>0$.

Assuming your independent variables are $x$ and $y$. The dependent variables is $z$, then the multiple correlation coefficient is given by

$$R_{z,xy} = \sqrt{ \frac{r_{xz}^2 + r_{yz}^2 - 2r_{xz}r_{yz}r_{xy} }{ 1-r_{xy}^2 } }$$

where $r_{xz}$, $r_{yz}$, and $r_{xy}$ are defined as the correlation coefficient between 2 variables. The formula to each is the one you stated above.

• What if I want to study the effect of $x1$ on $y$ (without taking into account $x2$) and then study the effect of $x2$ on $y$ (without taking into account the effect of $x1$). Is it possible? Commented Oct 8, 2015 at 17:40
• Those two studies are called simple regression. There are many examples of its theory, output, and interpretation on this site.
– whuber
Commented Oct 9, 2015 at 14:58
• @whuber, the OP might also be interested in the partial correlation and/or the semi-partial correlation. In his case, this approach or the simple regression approach should give the same results since he's dealing with only 2 independent variables. Hence, holding one as a constant reduces to the simple regression form. Please correct me if I am wrong. Commented Oct 12, 2015 at 9:20
• The simple (univariate) regression coefficients will differ from the multivariate coefficients when there are two or more regressors that are not orthogonal. The simple correlation coefficients will also differ from the partial correlation coefficients in those cases.
– whuber
Commented Oct 12, 2015 at 16:28
• Neither: since you want to study the relationship, and you view $Y$ as a response to be related to regressors $X_i$, then perform multiple linear regression.
– whuber
Commented Oct 19, 2015 at 15:10