Constant in Ordinary Least Squares

Suppose, I estimate the model

$y_i = \beta_0 \,\mathrm{cons}_i$

with simple OLS, where $\mathrm{cons}_i$ is a variable that takes the value $1$ for each $i$ (classical constant). Why is the estimate $\widehat{\beta}_0$ the sample average of $y_i$?

• No, I am curious. – bachelor Nov 22 '16 at 11:04

$$y_i = \beta_0 \,\mathrm{cons}_i + \varepsilon_i = \beta_0 + \varepsilon_i$$
$$E(Y) = E(\beta_0 + \varepsilon_i) = \underbrace{\beta_0 + E(\varepsilon_i) }_{\text{since } \beta_0 \text{ is constant}} = \underbrace{\beta_0 + 0}_{\text{since } E(\varepsilon_i) = 0}$$
Saying it differently, we are looking for some $\beta_0$ value that minimizes squared errors (since OLS minimizes squared errors), and the value that minimizes squared error is arithmetic mean (see Intuition on why the average minimizes the euclidean distance).