# Straight-line regression model

Why the writer use the minus the average of x in the x matrix?

• 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 Jun 25, 2021 at 8:12
• Thanks for your nice answer. :) So we have two notations of one thing and it depends on your problem. Please give me a link to study more if it is possible. also for OLS. Jun 25, 2021 at 8:21
• @Henry maybe convert it into an answer.
– Tim
Jun 25, 2021 at 8:24

## 1 Answer

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.