Regression error (source code)

= Regression error
{title2=$\varepsilon$}

In a <linear regression> model $Y=X\beta+\varepsilon$, the <regression error> $\varepsilon$ is the unobserved discrepancy between the response and the model's systematic component. The assumption $\mathbb E[\varepsilon\mid X]=0$ makes $X\beta$ the <conditional expectation> of $Y$ given $X$; it does not follow merely from writing the equation.

For a scalar response $Y=2+3x+\varepsilon$, an observation $x=4,Y=15$ has error one if the stated coefficients are the true model coefficients. A <regression residual> instead uses fitted coefficients: $e=Y-X\widehat\beta$. Errors and residuals therefore answer different questions. In <ordinary least squares>, $X^Te=0$ holds algebraically when the fit exists, even though $X^T\varepsilon$ need not be zero for a realized <statistical sample>. Assuming <independence> or constant <variance> of the errors is a further modeling choice.