VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

Why Mathematics? | R-Squared: Explained Variation and Its Limits

Why is mathematics important when a regression model needs a clear measure of how much sample variation it accounts for? R-squared, the coefficient of determination, compares the model's regression sum of squares with the total sum of squares, or equivalently subtracts the residual fraction from one.

R-squared is useful descriptive mathematics, but it is easy to overclaim. A high value does not prove causation, correct functional form, useful prediction or good behaviour outside the observed data.

Did You Know? A model can have an impressive R-squared and still miss a curve, contain influential cases or make poor forecasts at new predictor values.

Full chapter index

Chapters 1–4 · Understand the question
  1. The variation-accounting question
  2. The authoritative definition
  3. The three sums of squares
  4. A worked example
Chapters 5–9 · Reproduce the example
  1. Interpretation in the fitted sample
  2. Why explained is in quotation marks
  3. The intercept condition
  4. Units disappear
  5. Compare residual standard error
Chapters 10–15 · Check assumptions
  1. Why adding predictors raises R-squared
  2. Adjusted R-squared
  3. R-squared and prediction
  4. Restricted predictor ranges
  5. Nonlinearity
  6. Outliers and influential cases
Chapters 16–20 · Explore applications
  1. A spreadsheet workflow
  2. A coding workflow
  3. Applications and careers
  4. A student investigation
  5. Common misconceptions
Chapters 21–31 · Study and verify
  1. Connection to recent mathematics articles
  2. Guidance for students and parents
  3. Practice questions
  4. Frequently asked questions
  5. A two-model audit
  6. Response transformations
  7. Group means and aggregation
  8. Time trends and spurious fit
  9. Baseline choice
  10. One-sentence conclusion
  11. Useful next reading

CHAPTER 1 OF 31 · Understand the question

1. The variation-accounting question

Back to contents

Responses vary around their sample mean. Regression divides that total variation into a part represented by fitted values and a residual part left unexplained by the fitted model.

Contents · Next chapter

CHAPTER 2 OF 31 · Understand the question

2. The authoritative definition

Back to contents

Penn State defines R-squared as SSR/SSTO and, because SSTO=SSR+SSE, also as 1-SSE/SSTO. Read Penn State STAT 501.

Contents · Previous chapter · Next chapter

CHAPTER 3 OF 31 · Understand the question

3. The three sums of squares

Back to contents

SSTO sums squared distances from observations to the response mean. SSR sums squared distances from fitted values to that mean. SSE sums squared distances from observations to fitted values.

SSTOSSESSR
20050150
R-squared inputs.

Contents · Previous chapter · Next chapter

CHAPTER 4 OF 31 · Understand the question

4. A worked example

Back to contents

Suppose SSTO=200 and SSE=50. Then SSR=200-50=150 and R-squared=150/200=1-50/200=0.75.

SSR/SSTO1−SSE/SSTO
0.750.75
R-squared result.

Contents · Previous chapter · Next chapter

CHAPTER 5 OF 31 · Reproduce the example

5. Interpretation in the fitted sample

Back to contents

An R-squared of 0.75 means the fitted regression accounts for 75% of the sample response variation about its mean under the model and data used. It does not mean 75% of individual outcomes are predicted correctly.

Contents · Previous chapter · Next chapter

CHAPTER 6 OF 31 · Reproduce the example

6. Why explained is in quotation marks

Back to contents

Penn State warns that explained variation can be mistaken for causation. A predictor may be associated with the response because of common causes, selection, timing or measurement patterns.

Contents · Previous chapter · Next chapter

CHAPTER 7 OF 31 · Reproduce the example

7. The intercept condition

Back to contents

For ordinary least squares with an intercept, centred SSTO=SSR+SSE and R-squared lies from zero to one. Without an intercept or with nonstandard definitions, software may use uncentred quantities and values can behave differently.

Contents · Previous chapter · Next chapter

CHAPTER 8 OF 31 · Reproduce the example

8. Units disappear

Back to contents

Sums of squares carry squared response units, but their ratio is unitless. R-squared does not show whether typical errors are small in the practical units that matter.

Contents · Previous chapter · Next chapter

CHAPTER 9 OF 31 · Reproduce the example

9. Compare residual standard error

Back to contents

Residual standard error returns to response units and describes typical scatter around the model under its assumptions. Report it alongside R-squared.

Contents · Previous chapter · Next chapter

CHAPTER 10 OF 31 · Check assumptions

10. Why adding predictors raises R-squared

Back to contents

In ordinary least squares, a larger model includes the smaller model as a special case. Training SSE cannot increase, so R-squared cannot fall even when an added term is unhelpful.

Contents · Previous chapter · Next chapter

CHAPTER 11 OF 31 · Check assumptions

11. Adjusted R-squared

Back to contents

Adjusted R-squared adds a degrees-of-freedom penalty. It can fall when the gain in fit is too small, but it remains an in-sample comparison.

Contents · Previous chapter · Next chapter

CHAPTER 12 OF 31 · Check assumptions

12. R-squared and prediction

Back to contents

Prediction depends on residual scale, leverage, data shift and validation. PRESS or a genuine test set answers a more direct unseen-case question.

Contents · Previous chapter · Next chapter

CHAPTER 13 OF 31 · Check assumptions

13. Restricted predictor ranges

Back to contents

A narrow range of x can produce a low R-squared even when measurement is precise, while a broad range can raise it. Compare studies only with attention to design and population.

Contents · Previous chapter · Next chapter

CHAPTER 14 OF 31 · Check assumptions

14. Nonlinearity

Back to contents

A straight line can achieve a high R-squared across a curved relation yet leave systematic residuals. Inspect residual and partial-residual plots.

Contents · Previous chapter · Next chapter

CHAPTER 15 OF 31 · Check assumptions

15. Outliers and influential cases

Back to contents

One extreme case can raise or lower R-squared substantially. Check leverage, studentized residuals and Cook’s distance rather than trusting the summary alone.

Contents · Previous chapter · Next chapter

CHAPTER 16 OF 31 · Explore applications

16. A spreadsheet workflow

Back to contents

Calculate the response mean, SSTO, fitted values, residuals, SSE and SSR in labelled columns. Verify both R-squared formulas and the sum-of-squares identity.

Contents · Previous chapter · Next chapter

CHAPTER 17 OF 31 · Explore applications

17. A coding workflow

Back to contents

Return R-squared with sample size, model formula, intercept convention, SSE, SSTO and validation metrics. Preserve identical rows across candidate comparisons.

Contents · Previous chapter · Next chapter

CHAPTER 18 OF 31 · Explore applications

18. Applications and careers

Back to contents

R-squared appears in engineering, economics, environmental science, education research and data analytics. The professional skill is knowing what the proportion does and does not say.

Contents · Previous chapter · Next chapter

CHAPTER 19 OF 31 · Explore applications

19. A student investigation

Back to contents

Fit a line to one dataset, then add an influential point. Track R-squared and residual plots. Explain why a single summary cannot diagnose the model.

Contents · Previous chapter · Next chapter

CHAPTER 20 OF 31 · Explore applications

20. Common misconceptions

Back to contents

R-squared is not accuracy, probability, effect size in response units or causal evidence. A lower value does not automatically make research useless.

Contents · Previous chapter · Next chapter

CHAPTER 21 OF 31 · Study and verify

21. Connection to recent mathematics articles

Back to contents

The adjusted R-squared guide explains the parameter penalty. The PRESS guide adds omitted-case prediction.

Contents · Previous chapter · Next chapter

CHAPTER 22 OF 31 · Study and verify

22. Guidance for students and parents

Back to contents

Students should show SSTO, SSE and the intercept convention. Parents can ask whether practical error and validation support the headline proportion.

Contents · Previous chapter · Next chapter

CHAPTER 23 OF 31 · Study and verify

23. Practice questions

Back to contents

  • Recalculate when SSE=80.
  • Explain why changing the predictor range can change R-squared.
  • Describe a high-R-squared model that still fails a residual check.

Contents · Previous chapter · Next chapter

CHAPTER 24 OF 31 · Study and verify

24. Frequently asked questions

Back to contents

### Is 0.8 always good? No. Context, error units and purpose matter.

### Does R-squared prove cause? No.

### Can it compare different responses? Usually not without careful justification.

Contents · Previous chapter · Next chapter

CHAPTER 25 OF 31 · Study and verify

25. A two-model audit

Back to contents

Suppose two models use the same 40 observations. Model A has SSE 60 and Model B has SSE 55 with two extra parameters. Ordinary R-squared favours B, but the decision should also examine adjusted R-squared, PRESS, residual shape and whether the extra terms have a defensible mechanism. Writing all five items beside the score prevents a descriptive proportion from becoming an automatic model-selection rule.

Contents · Previous chapter · Next chapter

CHAPTER 26 OF 31 · Study and verify

26. Response transformations

Back to contents

R-squared from a model of log income describes variation on the log scale, not the original dollar scale. Back-transformed prediction has additional complications. Compare models on different response scales only with a criterion designed for that comparison and a clear practical question.

Contents · Previous chapter · Next chapter

CHAPTER 27 OF 31 · Study and verify

27. Group means and aggregation

Back to contents

Aggregating individual observations into group means can change both total and residual variation, often producing a very different R-squared. State the unit of analysis. A strong relationship among school averages, for example, does not automatically describe variation among individual students.

Contents · Previous chapter · Next chapter

CHAPTER 28 OF 31 · Study and verify

Back to contents

Two unrelated quantities that both trend over time can produce a high R-squared. Plot time, examine stationarity and use a design appropriate to temporal dependence. A fit statistic does not remove the need for a plausible mechanism.

Contents · Previous chapter · Next chapter

CHAPTER 29 OF 31 · Study and verify

29. Baseline choice

Back to contents

The usual centred R-squared compares the regression with predicting the sample mean. That baseline may not match the real operational alternative, such as yesterday’s value or an existing production model. Report performance against the decision-relevant benchmark as well.

Contents · Previous chapter · Next chapter

CHAPTER 30 OF 31 · Study and verify

30. One-sentence conclusion

Back to contents

A careful conclusion names the response, sample and model: “The fitted model accounted for 75% of the observed variation in y about its sample mean.” Then add the residual error scale and validation result. This wording keeps the claim descriptive and auditable.

Contents · Previous chapter · Next chapter

CHAPTER 31 OF 31 · Study and verify

31. Useful next reading

Back to contents

Use the Mathematics Learning Hub to connect ratios, variance and functions. Rebuild an ANOVA table and verify every sum-of-squares identity.

Contents · Previous chapter · Mathematics Learning Hub

Extended practice laboratory

Practice case 1: Calculate response mean

Setup: Start from the article’s R-squared worked example for case 1. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 2: Calculate SSTO

Setup: Start from the article’s R-squared worked example for case 2. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 3: Calculate fitted values

Setup: Start from the article’s R-squared worked example for case 3. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 4: Calculate residuals

Setup: Start from the article’s R-squared worked example for case 4. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 5: Calculate SSE

Setup: Start from the article’s R-squared worked example for case 5. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 6: Calculate SSR

Setup: Start from the article’s R-squared worked example for case 6. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 7: Verify SS identity

Setup: Start from the article’s R-squared worked example for case 7. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 8: Form SSR over SSTO

Setup: Start from the article’s R-squared worked example for case 8. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 9: Form one minus SSE ratio

Setup: Start from the article’s R-squared worked example for case 9. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 10: Convert to percentage

Setup: Start from the article’s R-squared worked example for case 10. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 11: Increase SSE

Setup: Start from the article’s R-squared worked example for case 11. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 12: Add predictor

Setup: Start from the article’s R-squared worked example for case 12. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 13: Change predictor range

Setup: Start from the article’s R-squared worked example for case 13. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 14: Remove intercept

Setup: Start from the article’s R-squared worked example for case 14. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 15: Compare adjusted R squared

Setup: Start from the article’s R-squared worked example for case 15. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 16: Compare residual error

Setup: Start from the article’s R-squared worked example for case 16. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 17: Compare PRESS

Setup: Start from the article’s R-squared worked example for case 17. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 18: Inspect curvature

Setup: Start from the article’s R-squared worked example for case 18. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 19: Inspect leverage

Setup: Start from the article’s R-squared worked example for case 19. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 20: Inspect Cook distance

Setup: Start from the article’s R-squared worked example for case 20. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 21: Change response units

Setup: Start from the article’s R-squared worked example for case 21. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 22: Check same rows

Setup: Start from the article’s R-squared worked example for case 22. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 23: Reject accuracy claim

Setup: Start from the article’s R-squared worked example for case 23. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 24: Reject causal claim

Setup: Start from the article’s R-squared worked example for case 24. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.

Practice case 25: Write an R-squared conclusion

Setup: Start from the article’s R-squared worked example for case 25. Task: Change the named quantity, recompute dependent values and compare with the original.

Check: Check the defining identity, preserve units and state one diagnostic or validation step before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.