A Continuous Second Variable
What changes when both predictors are numbers
So far our second variable was binary — goalkeeper or outfield. But what if the second variable is also continuous, like age?
The colour reveals a pattern: younger players tend to have higher market values at any salary level, while older players are worth less. Age carries information that salary alone misses.
With two continuous predictors, the regression ‘line’ becomes a flat surface — a plane in three dimensions.
Drag to rotate
The model finds the flat plane that minimises the sum of squared vertical distances from each point to the surface. Drag the plot to rotate and explore the plane from different angles.
b₁: holding age constant, each extra €1M in salary changes value by b₁. b₂: holding salary constant, each extra year of age changes value by b₂.
Each extra €1M in salary adds 3.78 M€ to predicted value for players of the same age. Each extra year of age changes value by -2.19 M€ for players on the same salary.
Plug in any salary and age to get a prediction. Watch how the regression line shifts as you change the age.
With a binary second variable we got two lines. With a continuous second variable we get a whole family of lines — one for every age.
All lines have the same slope (3.78). The only difference is the height — each year of age shifts the line by -2.19. This is exactly the additive assumption: the salary effect is the same at every age.