Chapter 1 of 7
Adding a Second Variable
Multiple Linear Regression
In simple regression, we used one variable — salary — to predict market value. R² = 70.8%. Can we do better?
Estimated regression equation
But these players have different positions. It may help us improve the model.
The single line underpredicts outfield players and overpredicts goalkeepers. It seems that position matters.
Add position as a second variable. Each group gets its own intercept — but the same slope.
Estimated regression equation
R² 0.0%
The binary variable is a switch. It shifts the line up for outfield players by a fixed amount.
Full estimated equation
Goalkeeper (outfield = 0)
Outfield (outfield = 1)
Both lines have the same slope (3.04). The only difference is the starting point — the vertical shift of 10.8.