= Solution
Write $S_{xx}=\sum_i x_i^2$ and $\bar Y=n^{-1}\sum_iY_i$. For an identifiable two-parameter <linear regression> assume $S_{xx}>0$; for the <variance> estimate and test below also assume $n>2$. The <least-squares normal equations> are
$$
\sum_i(Y_i-\widehat\alpha-\widehat\beta x_i)=0,\qquad\sum_i x_i(Y_i-\widehat\alpha-\widehat\beta x_i)=0.
$$
Using $\sum_i x_i=0$ gives
$$
\boxed{\widehat\alpha=\bar Y,\qquad\widehat\beta=\frac{\sum_i x_iY_i}{S_{xx}}.}
$$
The <residual sum of squares> has positive-definite quadratic part $n\alpha^2+S_{xx}\beta^2$, so these equations give its unique minimum. The <normal distribution> of the independent errors gives the <log-likelihood>
$$
\ell(\alpha,\beta,\sigma^2)=-\frac n2\log(2\pi\sigma^2)-\frac1{2\sigma^2}\sum_i(Y_i-\alpha-\beta x_i)^2.
$$
For every fixed positive $\sigma^2$, maximizing this over $\alpha,\beta$ is exactly minimizing the same <residual sum of squares>. Thus the <ordinary least squares estimators> are also the <maximum-likelihood estimators>.
The printed hypotheses do not explicitly require $S_{xx}>0$ or $n>2$. If $S_{xx}=0$, all $x_i$ vanish and $\beta$ is unidentifiable; this is an intercept-only model with $n-1$ residual degrees of freedom. For $n=1$ its residual is identically zero, so the likelihood has no finite maximizer with positive variance. If $S_{xx}>0$ but $n=2$, the fit is saturated, leaving no residual <variance> estimate or Student test with positive degrees of freedom. The following nondegenerate formulas use $S_{xx}>0$ and $n>2$.
Back to article page