# Expected value of residuals for LASSO model?

For simple OLS models the expected value of the residuals

E(ϵ)=0

can be shown to be zero if an intercept is included in the regression equation. I am using a LASSO model and was wondering if the same is true here? Can anybody help me show why/why not? Thanks

The expectation of the residuals are zero by construction, since you don't penalize the intercept in LASSO. Instead in a first step you estimate the slope parameters using the LASSO and in a second step you estimate the intercept. For instance, after having estimated $$\beta\in \mathbb{R}^p$$ by your LASSO estimate $$\widehat{\beta}$$, you estimate the intercept $$\beta_0$$ by $$\widehat{\beta}_0 = \overline{y}-\sum_{j=1}^p\overline{x}_j\widehat{\beta}_{j},$$ where $$\overline{y}$$ and $$\overline{x}_j$$ are the averaged values of $$y$$ and $$x_j$$ respectively. Your fitted values $$\widehat{y}$$ are then calculated as $$\widehat{y}_i = \widehat{\beta}_0 + \sum_{j=1}^p x_{i,j}\widehat{\beta}_{j} = \overline{y} + \sum_{j=1}^p (x_{i,j}-\overline{x}_j)\widehat{\beta}_j.$$ By construction this implies that we always have $$\frac{1}{n}\sum_{i=1}^n e_i = \frac{1}{n}\sum_{i=1}^n(y_i-\widehat{y}_i) = 0.$$ Furthermore, under the usual iid assumptions the last line then would imply: $$\mathbb{E}(e_i) = \mathbb{E}(\frac{1}{n}\sum_{i=1}^n e_i) = \mathbb{E}(0) = 0.$$