The OLS Solution
Hand calculation, step by step
OLS finds the one line with the smallest sum of squared error. Let's calculate it by hand.
Step 1: Find the averages. x̄ (mean salary) and ȳ (mean value).
Step 2: How far is each point from the average? These are deviations.
Step 3: Multiply the deviations together. Sum them up, then divide by n − 1 — that's the covariance.
| # | xi - x̄ | × | yi - ȳ | = | product |
|---|---|---|---|---|---|
| 1 | -4.21 | × | -13.6 | = | 57.2 |
| 2 | -3.21 | × | -11.6 | = | 37.2 |
| 3 | -2.61 | × | -3.6 | = | 9.4 |
| 4 | -1.56 | × | -9.6 | = | 15.0 |
| 5 | -1.14 | × | -1.6 | = | 1.8 |
| 6 | -0.41 | × | 3.4 | = | -1.4 |
| 7 | -0.01 | × | 0.4 | = | -0.0 |
| 8 | 0.19 | × | -6.6 | = | -1.3 |
| 9 | 0.49 | × | 0.4 | = | 0.2 |
| 10 | 0.99 | × | -1.6 | = | -1.6 |
| 11 | 1.39 | × | 5.4 | = | 7.5 |
| 12 | 1.69 | × | 8.4 | = | 14.2 |
| 13 | 2.29 | × | 6.4 | = | 14.7 |
| 14 | 2.69 | × | 13.4 | = | 36.1 |
| 15 | 3.39 | × | 10.4 | = | 35.3 |
| Sum / (n - 1) = | 16.0 | ||||
Step 4: Square the x-deviations and average them. That's the variance of x.
| # | xi - x̄ | (xi - x̄)² |
|---|---|---|
| 1 | -4.21 | 17.71 |
| 2 | -3.21 | 10.29 |
| 3 | -2.61 | 6.80 |
| 4 | -1.56 | 2.43 |
| 5 | -1.14 | 1.30 |
| 6 | -0.41 | 0.17 |
| 7 | -0.01 | 0.00 |
| 8 | 0.19 | 0.04 |
| 9 | 0.49 | 0.24 |
| 10 | 0.99 | 0.98 |
| 11 | 1.39 | 1.94 |
| 12 | 1.69 | 2.86 |
| 13 | 2.29 | 5.25 |
| 14 | 2.69 | 7.25 |
| 15 | 3.39 | 11.51 |
| Sum / (n - 1) = | 4.9 | |
Step 5: Divide covariance by variance. That's β₁, the slope.
For every additional €1M in annual salary, the predicted market value increases by €3.3M.
Step 6: Calculating the intercept. β₀ = ȳ − β₁ · x̄
A player with €0M salary would have a predicted market value of €6.1M. (It's the baseline, not a real prediction.)
The intuition behind this formula is: we need to select an intercept, so that when we plug in the mean value of X in the model, we would get the mean value of Y.