Resources For Teachers For Tutors For Students & Parents AI New Books Pricing
Year 12 Maths - General (Unit 3 & Unit 4) Investigating and modelling linear associations

The coefficient of determination

20 practice questions 0 video lessons Theory + worked examples

Measure how much a least squares line really explains with the coefficient of determination in Year 12 VCE General Mathematics. A Wimmera wheat farmer knows rainfall matters, but how much of the ups and downs in yield does it account for? Squaring Pearson's correlation coefficient gives \(r^2\), a share of the variation from \(0\) to \(1\).

You will square \(r\) (from summary values or technology), turn \(r^2\) into a percentage and write the standard sentence with the response variable first. You will also work back from \(r^2\) to \(r\) using the direction of the association, compare two possible explanatory variables, and then use residuals to check whether a straight line fits at all.

Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

The coefficient of determination, \(r^2\), tells you how much of the variation in a response variable a least squares line accounts for. This Year 12 General Mathematics guide for students in Victoria shows how to calculate \(r^2\), write the standard explained-variation sentence, and work back from \(r^2\) to \(r\).

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 the least squares line. It is a number from \(0\) to \(1\), usually quoted as a percentage.

It is the square of Pearson's correlation coefficient: \(r^2 = (r)^2\). Going back, \(r = \pm\sqrt{r^2}\), with the sign taken from the direction of the association (or the sign of the slope). Squaring removes the sign, so \(r^2\) says nothing about direction, and it is the same whichever variable is called \(x\).

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].”

Key idea. Square \(r\) to get \(r^2\), turn it into a percentage, and put it in the standard sentence with the response variable first. To go back to \(r\), take the square root and attach the sign of the association.
Scatterplot with the least squares lineEight points lying close to an increasing least squares line, r about 0.95. x y 2 4 6 8 2 4 6 8 10
Points close to the least squares line: \(r \approx 0.95\), so \(r^2 \approx 0.91\).
Explained and unexplained variationA bar split into 91% of the variation in y explained by the variation in x and 9% due to other factors.Variation in y91%explained by the variation in xother factors: 9%r² = 0.91
\(91\%\) of the variation in \(y\) can be explained by the variation in \(x\); the other \(9\%\) is due to other factors.

From \(r\) to the coefficient of determination:

\[r^2 = r \times r, \qquad 0 \le r^2 \le 1\]
r2=r×r

From \(r^2\) back to \(r\), choosing the sign from the direction of the association:

\[r = \pm\sqrt{r^2}\]
r=±r2

Explained and unexplained variation, as percentages:

\[\text{explained} = r^2 \times 100\%, \qquad \text{not explained} = 100\% - \text{explained}\]
explained=r2×100%
Strength from \(r\). Find \(|r| = \sqrt{r^2}\), then: strong if \(|r| \ge 0.75\), moderate if \(0.5 \le |r| < 0.75\), weak if \(0.25 \le |r| < 0.5\), and no association below \(0.25\).

Using the coefficient of determination

  1. Get \(r\). Use the value given, or find it with technology, keeping the unrounded value.
  2. Square it. \(r^2 = r \times r\). A negative \(r\) gives a positive \(r^2\).
  3. Convert to a percentage. Multiply by \(100\%\), rounding only at the end.
  4. Write the sentence. "\(X\%\) of the variation in [response] can be explained by the variation in [explanatory]." The rest, \(100\% - X\%\), is due to other factors.
  5. Going backwards. From \(r^2\), take \(\sqrt{r^2}\) and attach the sign from the direction (or the slope of the line), then judge the strength.
Example 1 — From r to the explained-variation sentence
For houses in Warragul, Pearson's correlation coefficient between floor area (explanatory) and annual heating cost (response) is \(r = 0.94\). Find \(r^2\), write it as a percentage in a sentence, and state the percentage due to other factors.
Solution

Square \(r\), then multiply by \(100\%\).

\(r^2\)\(=\)\((0.94)^2\)
\(r^2\)\(=\)\(0.94 \times 0.94\)
\(r^2\)\(=\)\(0.8836\)
\(\text{explained}\)\(=\)\(0.8836 \times 100\%\)
\(\text{explained}\)\(\approx\)\(88\%\)
\(\text{not explained}\)\(\approx\)\(100\% - 88\%\)
\(\text{not explained}\)\(\approx\)\(12\%\)
r2=0.8836

\(r^2 = 0.8836\). About 88% of the variation in annual heating cost can be explained by the variation in floor area. The other \(12\%\) is due to other factors, such as insulation or the type of heater.

Example 2 — From r squared back to r
For towns in Gippsland, there is a negative linear association between the distance from the coast (explanatory) and the average annual rainfall (response). The coefficient of determination is \(r^2 = 0.4225\). Find \(r\) and describe the strength of the association.
Solution

Take the square root; the association is negative, so \(r\) is negative.

\(|r|\)\(=\)\(\sqrt{0.4225}\)
\(|r|\)\(=\)\(0.65\)
\(r\)\(=\)\(-0.65\)
r=-0.65

\(r = -0.65\). Since \(0.5 \le 0.65 < 0.75\), this is a moderate negative linear association. About \(42\%\) of the variation in rainfall can be explained by the variation in distance from the coast.

Example 3 — Using technology
A Wimmera farmer recorded the growing-season rainfall and the wheat yield on six paddocks. Find \(r\) and \(r^2\), and interpret \(r^2\).
Growing-season rainfall (mm)300350400450500550
Wheat yield (t/ha)1.31.81.62.42.22.9
Solution

Enter rainfall as \(x\) and yield as \(y\). Square the unrounded \(r\):

\(S_{xx}\)\(=\)\(43750\)
\(S_{yy}\)\(\approx\)\(1.6933\)
\(S_{xy}\)\(=\)\(250\)
\(r\)\(=\)\(\dfrac{S_{xy}}{\sqrt{S_{xx} \times S_{yy}}}\)
\(r\)\(=\)\(\dfrac{250}{\sqrt{43750 \times 1.6933}}\)
\(r\)\(\approx\)\(0.9185\)
\(r^2\)\(\approx\)\((0.9185)^2\)
\(r^2\)\(\approx\)\(0.8436\)
\(\text{explained}\)\(\approx\)\(84\%\)
r2≈0.8436

\(r \approx 0.92\) and \(r^2 \approx 0.84\). About 84% of the variation in wheat yield can be explained by the variation in growing-season rainfall. (Squaring the rounded \(r = 0.92\) gives \(0.8464\), or \(85\%\): always square the unrounded value.)

Example 4 — Comparing explanatory variables
For runners in the Melbourne Marathon, the finishing time (response) has \(r = -0.84\) with weekly training distance and \(r = 0.35\) with age. Jordan says, "Training distance explains \(84\%\) of the variation in finishing time." Find \(r^2\) for each variable, correct Jordan, and say which variable explains more of the variation.
Solution

Compare explained variation by squaring each \(r\). The sign does not affect \(r^2\).

\(r^2_{\text{training}}\)\(=\)\((-0.84)^2\)
\(r^2_{\text{training}}\)\(=\)\(0.7056\)
\(r^2_{\text{age}}\)\(=\)\((0.35)^2\)
\(r^2_{\text{age}}\)\(=\)\(0.1225\)
0.7056>0.1225

About 71% of the variation in finishing time can be explained by the variation in weekly training distance, not \(84\%\): Jordan used \(r\) instead of \(r^2\). Only about \(12\%\) can be explained by the variation in age, so training distance explains far more. Its negative \(r\) just means runners who train further tend to finish faster.

Common pitfalls

Do not quote \(r\) as a percentage. \(r = 0.84\) does not mean \(84\%\) is explained. Square it first: \(0.84^2 \approx 0.71\), so about \(71\%\).
Keep the sentence the right way round. It is the variation in the response that is explained by the variation in the explanatory variable. Writing them the other way round is a common error.
Square the unrounded \(r\), and attach a sign going back. Rounding \(r\) first can change the percentage. When finding \(r\) from \(r^2\), the square root alone is always positive: use the direction of the association for the sign.

Frequently asked questions

What is the coefficient of determination?

It is r squared, the square of Pearson's correlation coefficient. It gives the proportion of the variation in the response variable that can be explained by the variation in the explanatory variable.

How do you interpret r squared?

Write it as a percentage in the sentence: X% of the variation in the response can be explained by the variation in the explanatory variable. The rest is due to other factors.

How do you find r from r squared?

Take the square root of r squared, then make r negative if the association is negative (or the slope is negative) and positive if it is positive.

Can r squared be negative?

No. It is a square, so it is always between 0 and 1. A negative association still gives a positive r squared.

Does r squared change if you swap x and y?

No. r is the same whichever variable is x, so r squared is the same too. The explained-variation sentence should still name the response variable first.

Is a high r squared enough to say a linear model is good?

Not on its own. Check the residual plot as well: a clear pattern means the relationship is not linear even if r squared is high.