Coefficient of Determination (R²)
Learn what R² tells you about a regression line, how to calculate it from r or from sums of squares, and why a high R² does not prove causation.
Advanced25 min18 problems
Definition
The coefficient of determination, written , tells you how much of the variation in the response variable is explained by the linear relationship with the explanatory variable .
For simple linear regression (one , one ), it is the square of the correlation coefficient:
It can also be calculated from two sums of squares:
- is the total variation of the -values around their mean
- is the variation that is left over after using the regression line (the sum of squared residuals, written SSR in the Residuals lesson)
is always between and . If , then **81% of the variation in is explained by the linear relationship with **, and the other 19% is not explained by the line.
Try it now
The correlation coefficient of a data set is . What is ?
Interactive Visual
Scatter Plot
Strong fit: hours studied and test score
ŷ = 9x + 43
r = 0.9, R² = 0.81 · strong positive correlation
Tap a point to see its coordinates.
Scatter Plot
Weak fit: shoe size and test score
ŷ = 3x − 44
r = 0.3, R² = 0.09 · weak positive correlation
Tap a point to see its coordinates.
Scatter Plot
Curved data: high R² but the wrong model
ŷ = 6x − 7
r = 0.981, R² = 0.963 · strong positive correlation
Tap a point to see its coordinates.
Interactive Sandbox
Expression Calculator
Try these:
History
No calculations yet
Practice Problems
18 problemsProblem 1 of 18
Easy
The correlation coefficient of a data set is . What is ?
Glossary
- Coefficient of determination ()
- The share of the variation in that is explained by the linear relationship with ; a number from to
- Total sum of squares ()
- : the total variation of the -values around their mean
- Sum of squared residuals (, also SSR)
- : the variation left over after using the regression line
- Residual
- The difference between an observed and a predicted value:
- Explained variation
- The part of the total variation in that the regression line accounts for:
Formula Card
R² from r
For simple linear regression, square the correlation coefficient
R² from sums of squares
One minus the share of the variation that is left over
Total sum of squares
Squared distances of the y-values from their mean
Sum of squared residuals
Squared distances of the y-values from the regression line
r from R²
Use the sign of the slope of the regression line