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.
Definition
- 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)
Try it now
Worked Examples
Square the correlation coefficient
Write it as a percent
Interpret in context
Answer: : 49% of the variation in sleep is explained by the linear relationship with screen time. Squaring removes the minus sign, so is never negative.
Common Mistakes
Using as the percent: ", so 50% of the variation is explained"
Why it's wrong: The percent of explained variation comes from , not from . You must square first.
Correct: , so only 25% of the variation is explained.
Forgetting the sign when going from back to
Why it's wrong: is always positive, but can be negative. hides the direction of the relationship.
Correct: Take the sign from the slope: if the slope is negative, , for example .
Thinking a high proves that causes
Why it's wrong: only measures how well a line fits the data. A confounding variable can drive both and .
Correct: Say "81% of the variation in is explained by the linear relationship with ", never " causes 81% of ". Causation needs a controlled experiment.
Thinking a high means a straight line is the right model
Why it's wrong: Curved data can still give . does not show patterns in the residuals.
Correct: Always look at the residual plot. Random scatter supports the line; a U shape or another pattern means a different model fits better.
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 problemsWhy It Matters
- Science: researchers report to show how well a model describes their measurements
- Business: analysts compare sales models and keep the one that explains more of the variation
- Sports: coaches check how much of the variation in sprint times is explained by training hours
- Medicine: doctors see how strongly a dose is linked to a change in blood pressure
Real World Applications
Sports Analytics
Coaches compare training data with race results to see how much of the difference in performance is linked to training.
Example:
If the correlation between weekly training hours and 100 m sprint time is , then : about 72% of the variation in sprint times is explained by the linear relationship with training hours.
For a swimming club, the correlation between weekly training hours and 50 m race time is .
What is ? Give it as a decimal.
Step 1: Write the mathematical expression
Square the correlation coefficient:
Real Estate Pricing
Real estate analysts build regression models for house prices and use $R^2$ to judge whether a model is good enough to use for valuations.
Example:
A model of price on floor area with explains 70% of the price variation; the other 30% comes from location, condition and other factors.
For a model of apartment prices on floor area, the total variation is and the sum of squared residuals is (both in squared thousands of dollars).
What is ? Give it as a decimal.
Step 1: Write the mathematical expression
Use :
Medicine and Dosage
In clinical studies, researchers check how strongly the dose of a medicine is linked to a change in a measurement such as blood pressure.
Example:
If a higher dose goes with lower blood pressure (negative slope) and , then : a moderate negative linear relationship.
A study finds that a higher dose goes with lower blood pressure. The regression line has a negative slope and .
What is the correlation coefficient ?
Step 1: Write the mathematical expression
Take the square root and choose the sign from the slope:
Key Takeaways
- 1The coefficient of determination is the share of the variation in explained by the linear relationship with
- 2For simple linear regression, , so squaring the correlation coefficient gives
- 3 compares the leftover variation with the total variation
- 4 is between and : means 81% of the variation in is explained
- 5To go back from to , take and give it the sign of the slope
- 6A high does not prove causation or a correct model: always check the residual plot
Frequently Asked Questions
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