Lesson 8: The coefficient of determination,
Choose the better explanatory variable
SkillsCoefficient of determinationPearson's correlation coefficient
Worked example
A property manager in Townsville wants to understand weekly rents. For eight houses she recorded the number of bedrooms, the distance to the beach and the weekly rent.
| House | A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|---|
| Bedrooms | 2 | 2 | 3 | 3 | 3 | 4 | 4 | 5 |
| Distance to beach (km) | 7.5 | 3.2 | 8.4 | 2.6 | 5.1 | 1.8 | 4.4 | 0.9 |
| Weekly rent ($) | 420 | 470 | 480 | 530 | 560 | 610 | 590 | 680 |
Which variable — number of bedrooms or distance to the beach — explains more of the variation in weekly rent? Justify your answer.
Step 1: Set up the two analyses
Weekly rent is the response variable in both. Compare each explanatory variable, bedrooms and distance to the beach, against rent.
Step 2: Calculate r for each
Bedrooms and rent: , a strong positive linear association.
Distance and rent: , a moderate negative linear association.
Step 3: Convert each to R²
Bedrooms: , so 90.6% of the variation in rent is explained.
Distance: , so 54.3% of the variation in rent is explained.
puts both on the same scale, explained variation, and removes the sign. A negative is not a sign of a weaker association.
Step 4: Compare and decide
The number of bedrooms explains 90.6% of the variation in weekly rent, compared with 54.3% for distance to the beach, so the number of bedrooms explains more of the variation.
Step 5: Comment on reasonableness
The conclusion rests on only eight houses in one city, so a larger sample would make it more reliable. Both variables are associated with rent, and in practice they act together.
Complex unfamiliar questions usually reward a comment on the limitations of the data.
Answer
The number of bedrooms. It explains about 90.6% of the variation in weekly rent (), compared with about 54.3% for distance to the beach ().
Try a similar one
A fresh question of the same kind, checked as you answer, with hints and a full solution.
Method
Calculate for each explanatory variable against the same response variable.
Square each to get , and compare the percentages of variation explained.
Compare sizes, not signs.
Comment on the size and source of the sample.
Watch out for
Choosing distance because is "smaller" than , or rejecting it because it is negative. Compare the sizes of , or compare .