The coefficient of determination, also called R-squared (R² or r²), is a statistical measure that shows how well the independent variable explains the variation in the dependent variable. It represents the proportion of variance in the dependent variable that can be predicted from the independent variable in a regression model.
The coefficient of determination, which is represented by R,2 is determined using the following formula:
R2 = 1 – (RSS/TSS)
- R2 represents the requrired R Squared value,
- RSS represents the residual sum of squares, and
- TSS represents the total sum of squares.
The coefficient of determination can also be calculated using another formula, which is given by: R2 = r2

Where,
- n = Number of scores given
- ∑XY = Sum of paired products
- ∑X = Sum of X scores
- ∑Y = Sum of Y scores
- ∑X² = Sum of squares of X scores
- ∑Y² = Sum of squares of Y scores
R-Squared Value Interpretation
The R-squared value shows how well a regression model explains the variation in the dependent variable. A higher R² value indicates a better fit of the model, while a lower R² value indicates a weaker relationship between the variables. However, R² alone is not always sufficient to evaluate the overall performance of a regression model.
Adjusted R Squared
As R squared formula takes into account only 2 variables. If more variables are to be added, then the value of R square never decreases but increases. Thus, we need to adjust the R square in order to compensate for the added variables. By adjusting the R-squared value the model becomes resistant to overfitting and underfitting.
Adjusted R-square formula is given as follows:
\bold{R^2_{adj}=1-\frac{(1-R^2)(N-1)}{N-p-1}}
- R2 is the Normal R square value,
- N is the Size of sample, and
- p is the no. of predictors.
R-Squared vs Adjusted R-Squared
The key differences between R-Squared and Adjusted R-Squared, are listed as follows:
Parameter | R-squared | Adjusted R-squared |
|---|---|---|
Meaning | It considers all the independent variables to calculate the coefficient of determination for a dependent variable. | It considers only those independent variables that really affect the value of a dependent variable. |
Use | It is used in case of simple linear regression | It is used in the case of linear as well as multiple regression. |
Range of Value | Its value ranges from 0 to 1 and can't be negative | Its value depends upon the significance of independent variables and may be negative if the value of the R-square is very near to zero. |
Solved Examples
Problem 1: Calculate the coefficient of determination from the following data:
X | Y |
|---|---|
1.2 | 0 |
1 | 5 |
2 | 2 |
3 | 0 |
Solution:
To calculate the coefficient of determination from above data we need to calculate ∑x, ∑y, ∑(xy), ∑x2, ∑y2, (∑x)2, (∑y)2.
X
Y
XY
X2
Y2
1.2
0
0
1.44
0
1
5
5
1
25
2
2
4
4
4
3
0
0
9
0
∑x = 7.2
∑y = 7
∑xy = 9
∑x
2
= 15.44
∑y
2
= 29
(∑x)2 = 51.84 and (∑y)2 = 49 and n = 4
Using
r = \frac{n\Sigma(xy)-\Sigma x \Sigma y}{\sqrt{[n\Sigma x^2 - (\Sigma x)^2][n\Sigma y^2 - (\Sigma y)^2]}} ⇒
r = \frac{4(9)-(7.2*7)}{\sqrt{[4(15.44) - 51.84][4(29) - 49]}} ⇒
r = \frac{36-50.4}{\sqrt{[61.76 - 51.84][116 - 49]}} ⇒
r = \frac{-14.4}{\sqrt{[9.92][67]}} ⇒
r = \frac{-14.4}{\sqrt{664.64}} ⇒
r = \frac{-14.4}{25.78} ⇒
r = 0.558 Thus, R^2 = r^2 = (0.558)^2
⇒
R^2 = 0.3120 = 31.2 \%
Problem 2: Calculate the coefficient of determination from the following data:
X | Y |
|---|---|
1 | 1 |
2 | 2 |
3 | 3 |
Solution:
To calculate the coefficient of determination from above data we need to calculate ∑x, ∑y, ∑(xy), ∑x2, ∑y2, (∑x)2, (∑y)2.
X
Y
XY
X2
Y2
1
1
1
1
1
2
2
4
4
4
3
3
9
9
9
∑x = 6
∑y = 6
∑xy = 14
∑x2
= 14
∑y2
= 14
(∑x)2 = 36 and (∑y)2 = 36 and n = 3
Using
r = \frac{n\Sigma(xy)-\Sigma x \Sigma y}{\sqrt{[n\Sigma x^2 - (\Sigma x)^2][n\Sigma y^2 - (\Sigma y)^2]}} ⇒
r = \frac{3(14)-(6*6)}{\sqrt{[3(14) - 36][3(14) - 36]}} ⇒
r = \frac{42-36}{\sqrt{[6][6]}} ⇒
r = \frac{6}{\sqrt{36}} ⇒
r = \frac{6}{6} ⇒
r = 1 Thus, R^2 = r^2 = (1)^2
⇒
R^2 = 1 = 100 \%
Problem 3: Calculate the coefficient of determination from the following data:
X | Y |
|---|---|
1 | 1 |
2 | 4 |
3 | 6 |
Solution:
To calculate the coefficient of determination from above data we need to calculate ∑x, ∑y, ∑(xy), ∑x2, ∑y2, (∑x)2, (∑y)2.
X
Y
XY
X2
Y2
1
1
1
1
1
2
4
8
4
16
3
6
18
9
36
∑x = 6
∑y = 11
∑xy = 27
∑x2
= 14
∑y2
= 53
(∑x)2 = 36 and (∑y)2 = 121 and n = 3
Using
r = \frac{n\Sigma(xy)-\Sigma x \Sigma y}{\sqrt{[n\Sigma x^2 - (\Sigma x)^2][n\Sigma y^2 - (\Sigma y)^2]}} ⇒
r = \frac{3(27)-(6*11)}{\sqrt{[3(14) - 36][3(53) - 121]}} ⇒
r = \frac{81-66}{\sqrt{[42-36][159-121]}} ⇒
r = \frac{15}{\sqrt{6*38}} ⇒
r = \frac{15}{15.1} ⇒
r = 0.993 Thus,
R^2 = r^2 = (0.993)^2
\Rightarrow R^2 = 0.9867 = 98.67 \%
Problem 4: Calculate the coefficient of determination if RSS = 1.5 and TSS = 1.9.
Solution:
Given RSS = 1.5, TSS = 1.9
Using R2 = 1 - (RSS/TSS)
⇒ R2 = 1 - (1.5/1.9)
⇒ R2 = 1-0.7894 ≈ 79%
⇒ R2 = 0.21 ≈ 21%
Problem 5: Calculate the coefficient of determination if RSS = 1.479 and TSS = 1.89734.
Solution:
Given RSS = 1.479, TSS = 1.89734
Using R2 = 1 - (RSS/TSS)
R2 = 1 - (1.479/1.89734)
⇒ R2 = 1 - 0.7795
⇒ R2 = 0.22 ≈ 22%