Least square estimator
The least square estimator for $β$ is
$$ \begin{align*}
\hat β = \arg\min_{β\in \R^p} \|Y - Xβ\|.
\end{align*} $$
$\hat β$ solves the normal equation
$$ \begin{align*}
X^T(Y - X\hat β) = 0.
\end{align*} $$
If $X$ has full rank, $X^T X$ is invertible, so
$$ \begin{align*}
\hat β = (X^T X)\inv X^T Y.
\end{align*} $$
Let $μ = Xβ$.
Then the least squares problem is equivalent to
$$ \begin{align*}
\hat μ = \arg\min_{μ\in \mathrm{Col}(X)} \|Y - μ\|
\end{align*} $$
where $\mathrm{Col}(X)$ is the column space of $X$.
-
The fitted value $\hat μ$ is given by
$$ \begin{align*}
\hat μ = X\hat β = PY
\end{align*} $$
where
$$ \begin{align*}
P = X(X^T X)\inv X^T
\end{align*} $$
is the orthogonal projection matrix into $\mathrm{Col}(X)$.
-
The vector of residues is given by
$$ \begin{align*}
R = Y - \hat μ = (I - P)Y.
\end{align*} $$
-
The residual sum of squares is
$$ \begin{align*}
\text{RSS} = \|R\|^2.
\end{align*} $$
In the normal linear model,
the maximum likelihood estimators for $β$ and $σ^2$ are
$$ \begin{align*}
\hat β_{\text{MLE}} ={}& \arg\min_{β\in \R^p} \|Y - Xβ\|, \\
\hat σ^2_{\text{MLE}} ={}& \frac{\text{RSS}}{n} =\frac{1}{n}\|Y - X\hat β_{\text{MLE}}\|^2 = \frac{1}{n}\min_{β\in \R^p} \|Y-Xβ\|^2.
\end{align*} $$
The resulting maximum likelihood is
$$ \begin{align*}
L_{Y\mid X}(\hat β_{\text{MLE}}, \hat σ^2_{\text{MLE}}) = \left(\frac{2πe}{n}\mathrm{RSS}\right)^{-n/2}.
\end{align*} $$
Proof
Assume $X$ has full rank.
In the linear conditional expectation model,
the least square estimator $\hat β$
is the best linear unbiased estimator (BLUE),
i.e. $\hat β$ is linear in $Y$, unbiased,
and for any other linear unbiased estimator $\tilde β$,
we have $\var \hat β$ $\preceq$ $\var \tilde β$
(which means $\var(a^T \hat β) \leq \var(a^T \tilde β)$).
Proof
A square matrix $P \in \R^{n\times n}$
is an orthogonal projection matrix
if it is symmetric ($P^T = P$) and idempotent ($P^2=P$).
-
See orthogonal projection.
-
$P$ is a orthogonal projection matrix iff $P=UU^T$
where the columns of $U\in \R^{n\times \mathrm{rank}(P)}$
form an orthonormal basis for the column space of $P$. (Proof)
-
Eigenvalues of $P$ are either 0 or 1.
-
$\mathrm{rank}(P) = \tr(P)$.
-
$I-P$ is also an orthogonal projection matrix.
-
$\|Y\|^2 = \|PY\|^2 + \|(I - P)Y\|^2$ for any $Y\in \R^n$.
Lemma (orthogonal projection matrix acting on multivariate normal)
open_in_new
Suppose $ε\sim N(0, σ^2 I_n)$ and $P$ is an $n\times n$ orthogonal projection matrix.
Then
-
$Pε \sim N(0, σ^2 P)$ and $(I_n-P)ε\sim N(0,σ^2(I_n-P))$ are independent; and
-
$\|Pε\|^2/σ^2 \sim χ^2_{\mathrm{rank}(P)}$.
Proof
Theorem (distribution of MLE in normal linear model)
open_in_new
In a normal linear model,
assume $X$ is fixed and has full rank.
Then maximum likelihood estimators
-
$\hat β_{\text{MLE}}$ and $\hat σ^2_{\text{MLE}}$ are independent;
-
$\hat β_{\text{MLE}} \sim N(β, σ^2(X^TX)\inv)$; and
-
$n\,\hat σ^2_{\text{MLE}}/σ^2 \sim χ_{n-p}^2$.
Proof