The coefficient of determination
Find out what the coefficient of determination \(R^2\) says about a data set in Year 12 General Mathematics for Queensland (QCAA). Peanut yields around Kingaroy rise and fall with the rain, but rainfall is not the whole story. \(R^2\) measures how much of the change in one quantity is accounted for by the other, and how much is left to other causes.
You will practise squaring \(r\) to get \(R^2\), taking a square root and choosing the right sign to recover \(r\), finding both with your calculator, and writing the standard interpretation sentence. You will also learn the common traps, such as reading \(r\) as a percentage. These ideas set you up for fitting and using the least-squares line.
Theory
The coefficient of determination \(R^2\) tells you how much of the variation in a response is explained by the explanatory variable. This Year 12 General Mathematics guide for Queensland students shows how to find \(R^2\) with technology, move between \(r\) and \(R^2\), and interpret it in a clear sentence.
The coefficient of determination, \(R^2\), measures how much of the variation in the response variable can be explained by the variation in the explanatory variable, using a straight-line model. It is a number from \(0\) to \(1\), usually quoted as a percentage.
For a linear association, \(R^2\) is the square of Pearson's correlation coefficient: \(R^2 = r^2\). Technology gives \(r\) and \(R^2\) together. Going back, \(r = \pm\sqrt{R^2}\), with the sign taken from the direction of the association.
Whatever is not explained, \(1 - R^2\), is due to other factors. The standard way to report \(R^2\) is: “[percentage] of the variation in [response] can be explained by the variation in [explanatory].”
From \(r\) to \(R^2\):
From \(R^2\) to \(r\), choosing the sign from the direction of the association:
The share of the variation due to other factors:
How to find and interpret R squared
- Find \(r\): from the question, or with technology from the data. Use the unrounded value.
- Square it: \(R^2 = r^2\). Round as required.
- Convert to a percentage by multiplying by \(100\%\).
- Interpret: “\(\ldots\%\) of the variation in [response] can be explained by the variation in [explanatory].” The rest is due to other factors.
- Reverse when needed: \(r = \pm\sqrt{R^2}\), negative for a negative association.
Square \(r\), then turn it into a percentage.
| \(R^2\) | \(=\) | \(r^2\) |
| \(R^2\) | \(=\) | \(0.95^2\) |
| \(R^2\) | \(=\) | \(0.9025\) |
| \(0.9025 \times 100\%\) | \(=\) | \(90.25\%\) |
| \(\text{other factors}\) | \(=\) | \(100\% - 90.25\%\) |
| \(\) | \(=\) | \(9.75\%\) |
90.25% of the variation in electricity demand can be explained by the variation in maximum temperature; 9.75% is due to other factors.
Take the square root, then use the negative sign because the association is negative.
| \(r\) | \(=\) | \(\pm\sqrt{R^2}\) |
| \(r\) | \(=\) | \(\pm\sqrt{0.3025}\) |
| \(r\) | \(=\) | \(\pm 0.55\) |
| \(\text{negative association}\) | \(\Rightarrow\) | \(r = -0.55\) |
| \(0.5 \le |r| = 0.55\) | \(<\) | \(0.75\) |
\(r = -0.55\): a moderate negative linear association.
| Rainfall (mm) | 400 | 500 | 550 | 650 | 700 | 800 |
|---|---|---|---|---|---|---|
| Yield (t/ha) | 2.1 | 2.6 | 2.4 | 3.1 | 3.5 | 3.2 |
Enter rainfall as \(x\) and yield as \(y\); square the unrounded \(r\).
| \(r\) | \(\approx\) | \(0.89\) |
| \(R^2\) | \(=\) | \(r^2\) |
| \(R^2\) | \(\approx\) | \(0.79\) |
| \(0.79 \times 100\%\) | \(=\) | \(79\%\) |
79% of the variation in peanut yield can be explained by the variation in rainfall. The other 21% is due to other factors, such as soil or pests.
Compare like with like: convert Model A's \(r\) to \(R^2\).
| \(R^2_A\) | \(=\) | \(0.75^2\) |
| \(R^2_A\) | \(=\) | \(0.5625\) |
| \(0.5625\) | \(>\) | \(0.52 = R^2_B\) |
Ava is not right: Model A explains 56.25% of the variation, not 75%. Model A still explains more than Model B (52%).
Common pitfalls
Frequently asked questions
What is the coefficient of determination?
It is R squared, the fraction of the variation in the response variable that can be explained by the variation in the explanatory variable using a linear model. It is between 0 and 1 and is often written as a percentage.
How do you get R squared from r?
Square r. For example, r = 0.9 gives R squared = 0.81, so 81% of the variation in the response can be explained by the variation in the explanatory variable.
How do you find r from R squared?
Take the square root of R squared, then give it the sign of the association: positive if the points rise, negative if they fall. For R squared = 0.64 and a negative association, r = -0.8.
How do you interpret R squared?
Write it as a percentage and use the sentence: that percentage of the variation in the response can be explained by the variation in the explanatory variable. The rest is due to other factors.
Can R squared be negative?
No. R squared is the square of r, so it is always between 0 and 1. It does not show the direction of the association; the sign of r does.