# R squared and correlation in R

#### Alex73+1

##### New Member
Hi all, this is more a statistical question than R programming really, and apologise in advance if this was already discussed but I could not find an actual topic matching my question... I have selected two elements out of a data frame to determine their correlation coefficient and R squared using R.
The data is made of 29 rows and 10 columns, showing dates in the first column and integers on the others (number of registrations throughout 29 days). The correlation coefficient result was 0.5297954 which squared value gives us the R squared 0.2807.
Now, in my understanding R squared measures the variation of the dependent variable by the independent variable (i.e. R squared 0.2807 can be interpreted as 28% of the variance of the dependent variable can be explained by the independent variable). Given the above is it correct to say that correlation coefficient and R squared are the same? Is it possible to have different values instead?
Thanks Al

Last edited:

#### Jake

In your own example, r = 0.53 and R^2 = 0.28....so clearly they're not the same.

#### hlsmith

##### Less is more. Stay pure. Stay poor.
Yeah, I don't understand what you are asking at the very end of your post? Are you asking if you can ever have an R^2 not equal to 2 * correlation coefficient?

#### Alex73+1

##### New Member
True. Errata corrige, I meant to say: "Given the above is it correct to say that correlation coefficient and Pearson R are the same?" I realized the answer is yes. Please disregard and thanks for your answers