On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Math · Statistics & Probability · Grade 9-12

Coefficient of Determination

The coefficient of determination r2 is the proportion of total variation in y explained by the linear relationship with x, equal to the square of the correlation r.

r2=1−SSresidualSStotal=1−∑(yi−y^i)2∑(yi−yˉ)2

Quick Answer

The coefficient of determination r2 is the proportion of total variation in y explained by the linear relationship with x, equal to the square of the correlation r. Use it to report how well a regression line accounts for the spread in y: r2=0.81 means 81% of the variation in y is explained by the line and 19% is left in the residuals. It runs from 0 to 1, has no sign and no units, and says nothing about cause.

Why This Matters

A slope says how fast y changes; r2 says how much that trend matters next to everything else affecting y. Two studies can find the same slope with r2=0.9 and r2=0.1: in the first x predicts y well, in the second it barely helps. Without r2, a weak but real trend can be presented as a strong predictor.

Intuitive Explanation

Test scores in a class vary: some students score 60, some 95. With no other information, your best guess for every student is the class mean, and your total squared error is SStotal=∑(y−yˉ)2. Now use hours studied and the regression line to predict each score. The predictions still miss, leaving SSresidual=∑(y−y^)2. The fraction of the original error that disappeared is r2=1−SSresidualSStotal.

For example, if SStotal=2000 and the line leaves SSresidual=500, then r2=1−5002000=0.75: the line explains 75% of the variation in scores, and 25% comes from other things such as sleep, prior knowledge or luck. For a straight-line fit this equals the correlation squared, so r=0.9 gives r2=0.81, and so does r=−0.9.

Because squaring drops the sign, r2 can't tell you whether y rises or falls with x; look at r or the slope for that. Squaring also shrinks: r=0.5 sounds moderate, but r2=0.25 leaves three quarters of the variation unexplained. And a high r2 shows a strong linear pattern, not causation: monthly ice cream sales and drownings can have a sizable r2 because both rise in hot weather.

Think of it like this. The total variation in y is a pie. The regression line claims the slice it can explain, r2, and the residuals keep the rest, 1−r2. A thin slice means x explains little; a nearly whole pie means the points hug the line. The pie says how much is explained, never which way the line tilts.

Core idea. r2 is the proportion of variation in y accounted for by the linear relationship with x — the square of the correlation.


When to Use

Use r2 when a question asks what fraction or percent of the variation in y is explained by x, or how well a line fits overall. Square r, or compute 1−SSresidualSStotal, and state it as a percent of the variation in y. If the question asks about direction, use the sign of r or of the slope. If it asks how much y changes per unit of x, that is the slope b. If it asks about one point's miss, that is a residual.

Tip. Ask: Am I reporting the fraction of y's variation explained by the linear model (a 0-to-1 number), not the slope or the correlation's sign?

How to Recognize It

Before reporting r2, check which number you were given and whether the question wants a share of variation, a direction, or a rate of change.

  1. Were you given the correlation r rather than r2 itself?

    If yes, square it: r=−0.8 gives r2=0.64, so 64% of the variation in y is explained. Going back from r2 to r, take the square root and attach the slope's sign.

  2. Does the answer need to say which way the relationship goes, up or down?

    If yes, r2 cannot say it, because it is never negative; use the sign of r or of the slope b. If the question asks how much y changes for each unit of x, that is the slope, with units.

  3. Does the residual plot show random scatter with no curve?

    If yes, r2 fairly describes how well the line fits. If the residuals curve, even a high r2 hides a wrong model: a curved relationship can reach r2 near 0.9 while the line still misses in a predictable way.

  4. Is the question about what the line fails to explain?

    If yes, that is 1−r2, the share of variation left in the residuals: r2=0.81 leaves 19% unexplained. One point's individual miss is a residual, not part of this percentage.

Coefficient of Determination compared with Correlation r, Slope b, and Residual variation

All four rows are numbers read off the same regression output, so they get mixed up. Ask what the number tells you: direction and strength (r), change in y per unit of x (slope), the share of variation explained (r2), or the share left over (1−r2).

Coefficient of Determination

Meaning
Use this when you need to report what proportion of the variation in y a linear model explains.
Key test
Am I reporting the fraction of y's variation explained by the linear model (a 0-to-1 number), not the slope or the correlation's sign?
Formula
r2=1−SSresidualSStotal=1−∑(yi−y^i)2∑(yi−yˉ)2
Example
A regression of weight on height gives correlation r=0.75. Find and interpret r2.

Correlation r

Meaning
Carries the sign and direction of association, ranging −1 to 1; r2 drops the sign and squares it.
Key test
Use r when you need direction (positive/negative) of the relationship.
Formula
r2=(r)2
Example
r=−0.9 vs r2=0.81

Slope b

Meaning
The rate y changes per unit x, carrying units; r2 is a unitless fraction of variation.
Key test
Use the slope when predicting the change in y per unit x.
Formula
b=rsysx
Example
0.6 kg per cm

Residual variation

Meaning
The unexplained leftover, equal to 1−r2 of the total.
Key test
Use when describing what the model fails to capture.
Formula
1−r2
Example
15% unexplained when r2=0.85

Formula & Notation

r2=1−SSresidualSStotal=1−∑(yi−y^i)2∑(yi−yˉ)2
r2=1−SSresSStot=1−∑(yi−y^i)2∑(yi−yˉ)2 where 0≤r2≤1

How to read it: r2 ranges from 0 to 1. SStotal = total sum of squares. SSresidual = residual sum of squares.

Worked Examples

Example 1 — Interpreting a fit

Easy

A regression of weight on height gives correlation r=0.75. Find and interpret r2.
Show the steps and the answer
  1. Square the correlation: r2=(0.75)2=0.5625.

    For a least-squares line, the fraction of variation explained equals r squared.

  2. Convert to a percent: about 56%.

    r2 is a proportion of variation, so a percent states it directly.

  3. Interpret: about 56% of the variation in weight is explained by the linear relationship with height.

    A complete interpretation names the response (weight), the explanatory variable (height) and the word 'linear'.

  4. State the remainder: 1−0.5625=0.4375, about 44%, is unexplained.

    Diet, build, age and other factors account for the rest of the spread in weights.

Answer: r2≈0.56

Takeaway: r2 is the share of y's variation the line explains; 1−r2 stays in the residuals.

Example 2 — Asking for direction

Standard

You're told r2=0.81 and asked whether the relationship is positive or negative. Can r2 answer that?
Show the steps and the answer
  1. Take the square root both ways: r=±0.81=±0.9.

    Both 0.92 and (−0.9)2 equal 0.81, so squaring erased the sign.

  2. Look elsewhere for direction: the sign of r, the sign of the slope b, or the scatter plot.

    Those carry direction; r2 carries only the strength of the linear fit.

  3. Conclude that r2 alone can't tell a positive relationship from a negative one.

    A strong upward trend and a strong downward trend can have exactly the same r2.

Answer: No — r2 can't give direction

Takeaway: r2 measures strength of fit, not direction; the sign lives in r and in the slope.

Example 3 — Find the mistake: reporting r as a percent explained

Application

For 40 students, the correlation between hours of sleep and quiz score is r=0.6. Hana writes: "Sleep explains 60% of the variation in quiz scores." Find the mistake and correct it.
Show the steps and the answer
  1. Notice that Hana reported r as if it were the proportion explained.

    The percent of variation explained is r2, not r.

  2. Square: r2=0.62=0.36.

    Squaring a number between 0 and 1 makes it smaller, so the fit is weaker than 60% suggests.

  3. Find the unexplained share: 1−0.36=0.64.

    Almost two thirds of the variation in quiz scores comes from other factors.

  4. Restate carefully: the linear relationship with sleep explains 36% of the variation in quiz scores.

    This describes an association among these 40 students; 'explains' means accounts for statistically, not causes.

Answer: Sleep explains about 36% of the variation in quiz scores, not 60%.

Takeaway: Square r before calling it a percent of variation: r=0.6 means r2=0.36.

Where You'll See It

  • Admission tests and college grades

    Studies of admission tests typically find correlations of about 0.3 to 0.5 with first-year college grades, so r2 is roughly 0.09 to 0.25. The scores help predict grades, but most of the variation comes from other factors, which is one reason colleges look at more than a single number.

  • Judging a sales forecast

    A store models weekly sales on advertising spending and gets r2=0.85. That means 85% of the week-to-week variation in sales moves with ad spending in a straight-line way, so the model is a strong planning tool, though it doesn't prove the ads caused the sales.

  • Height and shoe size

    In a sample of adults, height and shoe size might have r=0.8, so r2=0.64: height accounts for about 64% of the variation in shoe size, yet two people of the same height can still wear quite different sizes.

Common Mistakes

  1. The slip: Reporting r when the question asks for r2

    Instead: square the correlation; r=0.7 gives r2=0.49, not 0.7.

  2. The slip: Reading r2 as causation

    Instead: it measures explained variation, never that x causes y.

  3. The slip: Letting r2 go negative or above 1

    Instead: it's a proportion between 0 and 1, so any value outside that range is an error.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. A regression of quiz score on hours of sleep has r=0.6. Find r2 and interpret it.

    Hint: Square the correlation, then say what share of the variation it describes.

  2. A regression of car value on age has r=−0.9. Find r2. Does r2 show that the relationship is negative?

    Hint: What happens to a negative sign when you square?

  3. For a regression, ∑(yi−y^i)2=30 and ∑(yi−yˉ)2=120. Find r2.

    Hint: Use r2=1−SSresidualSStotal.

  4. A scatter plot slopes downward and r2=0.64. Find the correlation r.

    Hint: Take the square root, then choose the sign from the direction of the trend.

  5. A realtor wants to report what percent of the variation in house prices is explained by floor area. Should she report r or r2?

    Hint: Which measure is a proportion of variation?

  6. For ice cream sales and temperature, r2=0.81. Pat writes: "Temperature causes 81% of ice cream sales." Correct Pat's sentence.

    Hint: What exactly is the 81% a share of, and does r2 say anything about cause?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Is an r2 of 0.30 too low to be useful?

It depends on the field. In physics, a law measured in a lab usually gives r2r^2 above 0.99, so 0.30 would be poor. In studies of people, such as how hours of sleep relate to grades, many other factors affect the outcome, and explaining 30% of the variation can be an important finding. What r2r^2 cannot tell you is whether a line is the right shape; the residual plot does that.

Why does r=0.5 explain only 25% of the variation, not 50%?

Because the share of variation is r2r^2, not rr, and squaring a number between 0 and 1 makes it smaller. A correlation of 0.5 sounds like a halfway link, yet the line removes only a quarter of the spread in yy. You need r≈0.71r \approx 0.71 to explain half, since 0.712≈0.500.71^2 \approx 0.50. This is one reason a moderate correlation predicts individuals less well than people expect.

Can one unusual point change r2 a lot?

Yes. Ten points lying close to a line can give r2=0.99r^2 = 0.99, and adding a single point far above the middle of the cloud can drop it to about 0.3. The reverse also happens: one point far out in xx that lies on the trend can make a weak cloud look strong. So r2r^2 should always be read next to the scatter plot, never on its own.

Does r2 change if I switch units, such as from inches to centimetres?

No. Changing units multiplies every xx or every yy by a constant, which stretches the scatter plot but does not change how tightly the points hug the line. The correlation stays the same apart from a possible sign flip, so r2r^2 is unchanged. The slope does change: predicting weight in kilograms from height in centimetres gives a different slope from pounds and inches, yet the same share of variation explained.

Learning Path

Coefficient of Determination

You are here

You need Correlation, the Least Squares Regression Line and Residuals first, since r2 compares the squared residuals with the total variation in y. It adds one unitless number, from 0 to 1, for how much of y's variation a line explains. Next, Inference for Regression asks whether the relationship behind that fit holds in the population or could be due to chance.

See Also