# Calculating R^2 when ESS is unknown

#### RugbySpec

##### New Member
Hi
I'm new and looking for help please.
I have to calculate R^2 (R-squared) using a calculator and haven't been given the Explained Sum of Squares (ESS). Is there a way to do this?
I have been given:
Residual Sum of Squares 16.31
Standard deviation of outcome variable y 3.25
Correlation of predictor variables x and z -0.042
25 data points

Thank you

#### spunky

##### Doesn't actually exist
Sum of Squares Residual = (1 - R^2) * Sums of Squares of Y

You should be able to obtain the rest of the information from what was provided to you. But it's definitely doable.

#### RugbySpec

##### New Member
thanks Spunky.
Using your formula, to find R^2 am I right to rearrange it to:

1 - Sum of Squared Residuals divided by Sum of Squares of Y = R^2 ?

This makes 1 - (16.31 divided by 10.5625) = 0.54.

Whilst an R^2 of 0.54 is in the right ballpark (in that its between 0 and 1) it is not the correct answer for the problem I'm trying to solve.

#### spunky

##### Doesn't actually exist
10.5625 is not SSy (Sums of Squares Y). 10.5625 is the variance of Y.

So you're almost there but not quite. You're only missing one more step.

Last edited:

#### RugbySpec

##### New Member
Oh! So how do I get the SSy? I don't know how to do that as I don't have the original data; I just have the fact that there were 25 data points. Thank you!

#### Dason

Can you write out the formula for SSy and the formula for sample variance?

#### RugbySpec

##### New Member
I don't know either (Maybe (yi - ymean)2? ) I don't have the y data though or the mean.
The sample variance is the standard dev squared.

Am I getting close? Confused as heck!

#### spunky

##### Doesn't actually exist
Am I getting close? Confused as heck!
YES! Omg you're like so close! That's why @Dason mentioned the formula for the variance. You don't need the real data or anything to get to that answer. The relationships among the various quantities that you got are enough for you to solve for it. And yes, the correct answer is 0.9356607

You've already noticed that the standard deviation of Y plays a role. You took the first correct step, squaring it to get the variance. Now look at the formula for the variance (Google is your friend in case you don't know the formula) and look at it closely. How are the sums of squares related to the variance?

#### RugbySpec

##### New Member

OK, found two formulas! The top line is the same in both. So, am I doing 10.5625 divided by n-1? Thanks Spunky

#### spunky

##### Doesn't actually exist
OK, found two formulas! The top line is the same in both. So, am I doing 10.5625 divided by n-1? Thanks Spunky
Why would you do that? You already have the variance. You have

$$10.5625 =\frac{?}{25-1}$$

#### RugbySpec

##### New Member
morning! ok after some sleep I can totally see that I'm multiplying by n-1!!

#### RugbySpec

##### New Member
so in the end R^2 = 1-RSS/SSy and SSy is found by squaring the sd and * by n-1.

=.9356607 Horray!! Thanks so much.