Straight-line regression model Why the writer use the minus the average of x in the x matrix?


As requested in comments:
That will give for example $y_n=\gamma_0 + \gamma_1(x_n-\bar x) +\varepsilon_n$.
If you compare it to $y_n=\beta_0 + \beta_1 x_n +\varepsilon_n$ then you would get $\beta_1=\gamma_1$ and $\beta_0=\gamma_0 - \gamma_1 \bar x$,
so the issue is whether the intercept is measured at $x=0$ or $x=\bar x$.
Remember that the OLS regression line passes through the mean of the data.
