5  Maximum Likelihood Estimation and the Gauss–Markov Theorem

The least squares estimator of Chapter 4 was obtained by a purely geometric criterion: minimize the sum of squared errors. Two questions remain. First, if we are prepared to assume that the errors are normally distributed, what estimator does the more general principle of maximum likelihood give? Second, without assuming normality, is there any sense in which least squares is the best estimator? The answers are, respectively, “the same estimator of \(\boldsymbol\beta\)” and “yes, it is the best linear unbiased estimator”, the second being the celebrated Gauss–Markov theorem (Rao 1973; Montgomery, Peck, and Vining 2021).

5.1 Maximum likelihood estimation

Consider the model \(\mathbf y=\mathbf X\boldsymbol\beta+\boldsymbol\varepsilon\) and assume that \(\boldsymbol\varepsilon\sim\text{iid }N(\mathbf 0,\sigma^2\mathbf I)\). The normal density function of the error \(\varepsilon_i\) is

\[f(\varepsilon_i)=\frac1{\sigma\sqrt{2\pi}}\exp\left(-\frac{1}{2\sigma^2}\varepsilon_i^2\right).\]

The likelihood function is the joint density of \(\varepsilon_1,\varepsilon_2,\ldots,\varepsilon_n\), regarded as a function of the parameters:

\[\begin{aligned} L(\boldsymbol\beta,\sigma^2)&=\prod_{i=1}^nf(\varepsilon_i)=\frac1{(2\pi\sigma^2)^{n/2}}\exp\left[-\frac1{2\sigma^2}\sum_{i=1}^n\varepsilon_i^2\right]\\ &=\frac1{(2\pi\sigma^2)^{n/2}}\exp\left[-\frac1{2\sigma^2}\boldsymbol\varepsilon'\boldsymbol\varepsilon\right] =\frac1{(2\pi\sigma^2)^{n/2}}\exp\left[-\frac1{2\sigma^2}(\mathbf y-\mathbf X\boldsymbol\beta)'(\mathbf y-\mathbf X\boldsymbol\beta)\right]. \end{aligned} \tag{5.1}\]

Since the logarithmic transformation is monotonic, we maximize \(\ln L\) instead of \(L\):

\[\ln L(\boldsymbol\beta,\sigma^2)=-\frac n2\ln(2\pi\sigma^2)-\frac1{2\sigma^2}(\mathbf y-\mathbf X\boldsymbol\beta)'(\mathbf y-\mathbf X\boldsymbol\beta). \tag{5.2}\]

Expanding the quadratic form as in Equation 4.2,

\[\ln L(\boldsymbol\beta,\sigma^2)=-\frac n2\ln(2\pi\sigma^2)-\frac1{2\sigma^2}\left(\mathbf y'\mathbf y-2\boldsymbol\beta'\mathbf X'\mathbf y+\boldsymbol\beta'\mathbf X'\mathbf X\boldsymbol\beta\right).\]

Derivative with respect to \(\boldsymbol\beta\)

\[\begin{aligned} \frac{\partial\ln L(\boldsymbol\beta,\sigma^2)}{\partial\boldsymbol\beta}&=-\frac1{2\sigma^2}\left(-2\mathbf X'\mathbf y+2\mathbf X'\mathbf X\boldsymbol\beta\right)=\mathbf 0\\ \Rightarrow\ \mathbf X'\mathbf y-\mathbf X'\mathbf X\boldsymbol\beta&=\mathbf 0 \ \Rightarrow\ \tilde{\boldsymbol\beta}=(\mathbf X'\mathbf X)^{-1}\mathbf X'\mathbf y. \end{aligned} \tag{5.3}\]

Derivative with respect to \(\sigma^2\)

\[\frac{\partial\ln L(\boldsymbol\beta,\sigma^2)}{\partial\sigma^2}=-\frac n{2\sigma^2}+\frac1{2(\sigma^2)^2}(\mathbf y-\mathbf X\boldsymbol\beta)'(\mathbf y-\mathbf X\boldsymbol\beta)=0\]

\[\Rightarrow\ \frac1{2(\sigma^2)^2}(\mathbf y-\mathbf X\boldsymbol\beta)'(\mathbf y-\mathbf X\boldsymbol\beta)=\frac n{2\sigma^2} \ \Rightarrow\ \tilde\sigma^2=\frac1n(\mathbf y-\mathbf X\tilde{\boldsymbol\beta})'(\mathbf y-\mathbf X\tilde{\boldsymbol\beta})=\frac{SS_{Res}}n. \tag{5.4}\]

Second order conditions

At \((\tilde{\boldsymbol\beta},\tilde\sigma^2)\),

\[\frac{\partial^2\ln L}{\partial\boldsymbol\beta\,\partial\boldsymbol\beta'}=-\frac{\mathbf X'\mathbf X}{\sigma^2}\ \text{(negative definite)},\qquad \frac{\partial^2\ln L}{\partial(\sigma^2)^2}\Big|_{\tilde\sigma^2}=-\frac n{2\tilde\sigma^4}<0,\]

and the cross derivative \(\partial^2\ln L/\partial\boldsymbol\beta\partial\sigma^2=-\mathbf X'(\mathbf y-\mathbf X\boldsymbol\beta)/\sigma^4\) vanishes at \(\tilde{\boldsymbol\beta}\) because \(\mathbf X'\mathbf e=\mathbf 0\). The Hessian is therefore negative definite and the solution is a maximum.

5.2 Comparing the OLSE and the MLE

  1. Coefficients. The OLSE of \(\boldsymbol\beta\) and the MLE of \(\boldsymbol\beta\) are the same: \(\hat{\boldsymbol\beta}=\tilde{\boldsymbol\beta}=(\mathbf X'\mathbf X)^{-1}\mathbf X'\mathbf y\). Hence the MLE of \(\boldsymbol\beta\) is also unbiased.

  2. Error variance. The OLSE of \(\sigma^2\) is \(s^2=SS_{Res}/(n-p)\), which is unbiased. The MLE is

    \[\tilde\sigma^2=\frac{SS_{Res}}n=\frac{n-p}n\,s^2,\qquad E(\tilde\sigma^2)=\frac{n-p}n\,\sigma^2<\sigma^2. \tag{5.5}\]

    So \(\tilde\sigma^2\) is biased (downwards), with bias \(-p\sigma^2/n\). The bias vanishes as \(n\to\infty\), so \(\tilde\sigma^2\) is asymptotically unbiased and consistent. In small samples, and especially when \(p\) is not small relative to \(n\), \(s^2\) is preferred.

  3. Assumptions. Least squares needs no distributional assumption to compute; maximum likelihood requires the distribution of the errors to be specified. When the errors are not normal (for example heavy tailed), maximum likelihood leads to a different estimator (see Chapter 16).

  4. Efficiency under normality. Under normality, \(\hat{\boldsymbol\beta}\) attains the Cramér–Rao lower bound \(\sigma^2(\mathbf X'\mathbf X)^{-1}\) and is the minimum variance unbiased estimator among all unbiased estimators, linear or not.

Example 5.1 For the data of Example 4.1, compare the OLS and ML estimates of \(\sigma^2\).

Solution

\(SS_{Res}=25.459\), \(n=12\), \(p=3\). The OLS estimate is \(s^2=25.459/9=2.829\) and the ML estimate is \(\tilde\sigma^2=25.459/12=2.122\); indeed \(\tilde\sigma^2=\frac{9}{12}s^2\). The coefficient estimates are identical. In R, logLik(fit) reports the maximized log-likelihood, which uses \(\tilde\sigma^2\): here \(\ln L(\tilde{\boldsymbol\beta},\tilde\sigma^2)=-\frac n2[\ln(2\pi\tilde\sigma^2)+1]=-21.540\).

5.3 The Gauss–Markov set-up

Consider the linear model

\[\mathbf y=\mathbf X\boldsymbol\beta+\boldsymbol\varepsilon,\qquad E(\mathbf y)=\mathbf X\boldsymbol\beta,\qquad V(\mathbf y)=\sigma^2\mathbf I.\]

The triplet \(\left(\mathbf y,\ \mathbf X\boldsymbol\beta,\ \sigma^2\mathbf I\right)\), that is \(\left(\mathbf y,E(\mathbf y),V(\mathbf y)\right)\), is known as the Gauss–Markov set-up. No distributional assumption is made beyond the first two moments, and \(\mathbf X\) need not be of full rank.

Linear parametric functions and estimability

A linear parametric function is a linear combination \(\mathbf q'\boldsymbol\beta\) of the parameters. It is called estimable if there exists a linear function \(\mathbf k'\mathbf y\) with \(E(\mathbf k'\mathbf y)=\mathbf q'\boldsymbol\beta\) for all \(\boldsymbol\beta\), that is, if \(\mathbf q'=\mathbf k'\mathbf X\) for some \(\mathbf k\) (\(\mathbf q'\) lies in the row space of \(\mathbf X\)). When \(\mathbf X\) has full column rank, every \(\mathbf q'\boldsymbol\beta\) is estimable. In designed experiments, where \(\mathbf X\) is often not of full rank, only certain functions (such as treatment contrasts) are estimable.

Solutions of the normal equations

When \(\mathbf X'\mathbf X\) is singular, the normal equations \(\mathbf X'\mathbf X\boldsymbol\beta=\mathbf X'\mathbf y\) do not have a unique solution. A solution is

\[\boldsymbol\beta^0=\mathbf G\mathbf X'\mathbf y,\]

where \(\mathbf G\) is a generalized inverse (g-inverse) of \(\mathbf X'\mathbf X\), satisfying \(\mathbf X'\mathbf X\,\mathbf G\,\mathbf X'\mathbf X=\mathbf X'\mathbf X\). When \(\mathbf X'\mathbf X\) is non-singular, \(\mathbf G=(\mathbf X'\mathbf X)^{-1}\) and \(\boldsymbol\beta^0=\hat{\boldsymbol\beta}\). We use the following properties of g-inverses (Appendix A):

\[\mathbf X\mathbf G\mathbf X'\mathbf X=\mathbf X,\qquad (\mathbf X\mathbf G\mathbf X'\mathbf X)'=\mathbf X'\mathbf X\mathbf G'\mathbf X'=\mathbf X', \tag{5.6}\]

and \(\mathbf X\mathbf G\mathbf X'\) is the same (symmetric, idempotent) matrix \(\mathbf H\) for every choice of \(\mathbf G\). Although \(\boldsymbol\beta^0\) depends on \(\mathbf G\), \(\mathbf q'\boldsymbol\beta^0\) does not when \(\mathbf q'\boldsymbol\beta\) is estimable.

5.4 The Gauss–Markov theorem

Gauss–Markov theorem

Under the Gauss–Markov set-up, among the class of linear unbiased estimators of an estimable linear parametric function \(\mathbf q'\boldsymbol\beta\), the least squares estimator \(\mathbf q'\boldsymbol\beta^0\) has the minimum variance. That is, least squares estimators are BLUE (Best Linear Unbiased Estimators).

Proof. Consider the Gauss–Markov set-up \(\mathbf y=\mathbf X\boldsymbol\beta+\boldsymbol\varepsilon\), \(E(\mathbf y)=\mathbf X\boldsymbol\beta\), \(V(\mathbf y)=\sigma^2\mathbf I\). Let \(\mathbf q'\boldsymbol\beta^0\) be the least squares estimator of \(\mathbf q'\boldsymbol\beta\), where \(\boldsymbol\beta^0=\mathbf G\mathbf X'\mathbf y\) is a solution of the normal equations.

Step 1: any other linear unbiased estimator. Let \(\mathbf k'\mathbf y\) be any other linear unbiased estimator of \(\mathbf q'\boldsymbol\beta\). Then

\[E(\mathbf k'\mathbf y)=\mathbf q'\boldsymbol\beta\ \Rightarrow\ \mathbf k'E(\mathbf y)=\mathbf q'\boldsymbol\beta\ \Rightarrow\ \mathbf k'\mathbf X\boldsymbol\beta=\mathbf q'\boldsymbol\beta\ \text{for all }\boldsymbol\beta\ \Rightarrow\ \mathbf q'=\mathbf k'\mathbf X. \tag{5.7}\]

Step 2: \(\mathbf q'\boldsymbol\beta^0\) is unbiased. Using Equation 5.7 and the g-inverse property \(\mathbf X\mathbf G\mathbf X'\mathbf X=\mathbf X\),

\[E(\mathbf q'\boldsymbol\beta^0)=\mathbf q'\mathbf G\mathbf X'E(\mathbf y)=\mathbf q'\mathbf G\mathbf X'\mathbf X\boldsymbol\beta=\mathbf k'\mathbf X\mathbf G\mathbf X'\mathbf X\boldsymbol\beta=\mathbf k'\mathbf X\boldsymbol\beta=\mathbf q'\boldsymbol\beta.\]

Step 3: variance of \(\mathbf q'\boldsymbol\beta^0\). First,

\[V(\boldsymbol\beta^0)=V(\mathbf G\mathbf X'\mathbf y)=\mathbf G\mathbf X'V(\mathbf y)\mathbf X\mathbf G'=\sigma^2\mathbf G\mathbf X'\mathbf X\mathbf G'.\]

Hence, using \(\mathbf q=\mathbf X'\mathbf k\) and \(\mathbf X'\mathbf X\mathbf G'\mathbf X'=\mathbf X'\),

\[\begin{aligned} V(\mathbf q'\boldsymbol\beta^0)&=\mathbf q'V(\boldsymbol\beta^0)\mathbf q=\sigma^2\mathbf q'\mathbf G\mathbf X'\mathbf X\mathbf G'\mathbf q =\sigma^2\mathbf q'\mathbf G\,\mathbf X'\mathbf X\mathbf G'\mathbf X'\mathbf k\\ &=\sigma^2\mathbf q'\mathbf G\mathbf X'\mathbf k=\sigma^2\mathbf q'\mathbf G\mathbf q. \end{aligned} \tag{5.8}\]

Step 4: covariance between the two estimators.

\[\begin{aligned} Cov(\mathbf q'\boldsymbol\beta^0,\ \mathbf k'\mathbf y)&=Cov(\mathbf q'\mathbf G\mathbf X'\mathbf y,\ \mathbf k'\mathbf y)=\mathbf q'\mathbf G\mathbf X'V(\mathbf y)\mathbf k\\ &=\sigma^2\mathbf q'\mathbf G\mathbf X'\mathbf k=\sigma^2\mathbf q'\mathbf G\mathbf q=V(\mathbf q'\boldsymbol\beta^0). \end{aligned} \tag{5.9}\]

Step 5: compare the variances.

\[\begin{aligned} V(\mathbf q'\boldsymbol\beta^0-\mathbf k'\mathbf y)&=V(\mathbf q'\boldsymbol\beta^0)+V(\mathbf k'\mathbf y)-2\,Cov(\mathbf q'\boldsymbol\beta^0,\mathbf k'\mathbf y)\\ &=V(\mathbf q'\boldsymbol\beta^0)+V(\mathbf k'\mathbf y)-2V(\mathbf q'\boldsymbol\beta^0)\\ &=V(\mathbf k'\mathbf y)-V(\mathbf q'\boldsymbol\beta^0). \end{aligned}\]

Since a variance cannot be negative, \(V(\mathbf q'\boldsymbol\beta^0-\mathbf k'\mathbf y)\ge0\), so

\[V(\mathbf k'\mathbf y)-V(\mathbf q'\boldsymbol\beta^0)\ge0\quad\Rightarrow\quad V(\mathbf k'\mathbf y)\ge V(\mathbf q'\boldsymbol\beta^0).\]

That is, \(\mathbf q'\boldsymbol\beta^0\) has minimum variance among the class of linear unbiased estimators of \(\mathbf q'\boldsymbol\beta\); the OLSE is BLUE. Equality holds only when \(V(\mathbf q'\boldsymbol\beta^0-\mathbf k'\mathbf y)=0\), i.e. \(\mathbf k'\mathbf y=\mathbf q'\boldsymbol\beta^0\), so the BLUE is unique. Hence proved. \(\blacksquare\)

5.4.1 An alternative proof for the full rank case

When \(\mathbf X\) has full column rank, any linear estimator of \(\boldsymbol\beta\) can be written \(\mathbf C\mathbf y\) with \(\mathbf C=(\mathbf X'\mathbf X)^{-1}\mathbf X'+\mathbf D\). Unbiasedness, \(E(\mathbf C\mathbf y)=\boldsymbol\beta+\mathbf D\mathbf X\boldsymbol\beta=\boldsymbol\beta\) for all \(\boldsymbol\beta\), requires \(\mathbf D\mathbf X=\mathbf 0\). Then

\[V(\mathbf C\mathbf y)=\sigma^2\mathbf C\mathbf C'=\sigma^2\left[(\mathbf X'\mathbf X)^{-1}+\mathbf D\mathbf D'\right]=V(\hat{\boldsymbol\beta})+\sigma^2\mathbf D\mathbf D',\]

because the cross products vanish (\(\mathbf D\mathbf X=\mathbf 0\)). Since \(\mathbf D\mathbf D'\) is non-negative definite, every linear unbiased estimator has a covariance matrix at least as large as that of \(\hat{\boldsymbol\beta}\), and in particular \(V(\tilde\beta_j)\ge V(\hat\beta_j)\) for every \(j\).

Note
  1. The Gauss–Markov theorem requires only \(E(\boldsymbol\varepsilon)=\mathbf 0\) and \(V(\boldsymbol\varepsilon)=\sigma^2\mathbf I\). Normality is not required.
  2. “Best” is relative to linear unbiased estimators. A biased estimator (such as ridge regression, Chapter 11) or a nonlinear estimator (such as a robust estimator, Chapter 16) can have smaller mean squared error.
  3. If \(V(\boldsymbol\varepsilon)=\sigma^2\mathbf V\) with \(\mathbf V\neq\mathbf I\), OLS is still unbiased but no longer best; the BLUE is then the generalized (weighted) least squares estimator of Chapter 12.
  4. The theorem also implies that the best linear unbiased predictor of the mean response at \(\mathbf x_0\) is \(\mathbf x_0'\hat{\boldsymbol\beta}\).

5.5 R practical

d12 <- read.csv("csv/notes12.csv")
fit <- lm(y ~ x1 + x2, data = d12)
n <- nrow(d12); p <- length(coef(fit))
SSres <- deviance(fit)               # residual sum of squares
c(OLS = SSres / (n - p), ML = SSres / n)
#>      OLS       ML 
#> 2.828777 2.121583
logLik(fit)                          # maximized log-likelihood
#> 'log Lik.' -21.54024 (df=4)
# Maximum likelihood by direct numerical optimization
negll <- function(th) {
  b <- th[1:3]; s2 <- exp(th[4])
  r <- d12$y - cbind(1, d12$x1, d12$x2) %*% b
  0.5 * n * log(2 * pi * s2) + sum(r^2) / (2 * s2)
}
opt <- optim(c(0, 0, 0, 0), negll, method = "BFGS")
round(c(opt$par[1:3], sigma2 = exp(opt$par[4])), 4)   # same as OLS beta; SSres/n
#>                          sigma2 
#>  5.3754  3.0118 -1.2855  2.1216
# A singular model: g-inverse solution and an estimable function
library(MASS)
X <- cbind(1, d12$x1, d12$x2, d12$x1 + d12$x2)   # 4th column is redundant
G <- ginv(t(X) %*% X)                             # Moore-Penrose g-inverse
b0 <- G %*% t(X) %*% d12$y
q <- c(1, 5, 8, 13)                               # q' = k'X, estimable
c(estimate = sum(q * b0), fitted_from_lm = sum(coef(fit) * c(1, 5, 8)))
#>       estimate fitted_from_lm 
#>       10.15063       10.15063
Historical Insights

Gauss, Markov and Aitken

Gauss proved in 1821, without assuming normality, that least squares gives the linear unbiased estimates with the smallest variance. Nearly a century later, the Russian mathematician Andrey Markov (better known for Markov chains) restated the result in his textbook on probability (1912), and the theorem came to bear both names. The modern matrix statement and its extension to correlated errors were given by Aitken in 1935 (Aitken 1935), and C. R. Rao’s unified theory of linear estimation using generalized inverses extended it to models of less than full rank (Rao 1973).

Quotes to Inspire

“An approximate answer to the right problem is worth a good deal more than an exact answer to an approximate problem.”
- John W. Tukey

5.6 Practical exercises

5.6.1 Practical 5.1: OLS and ML estimates of \(\sigma^2\)

For the milk yield data of Practical 4.1 (\(n=6\), \(p=3\)), compute the OLS and ML estimates of \(\sigma^2\), the bias factor of the ML estimate, and the maximized log-likelihood. Verify by direct numerical maximization of the likelihood.

Solution

\(SS_{Res}=2.2994\). The OLS estimate is \(s^2=2.2994/3=0.7665\) and the ML estimate is \(\tilde\sigma^2=2.2994/6=0.3832\). By Equation 5.5, \(E(\tilde\sigma^2)=\frac{n-p}{n}\sigma^2=0.5\sigma^2\): with only six observations and three parameters, the ML estimate is expected to be half the true variance. The maximized log-likelihood is \(-\frac n2[\ln(2\pi\tilde\sigma^2)+1]=-5.6363\), which equals logLik() in R. The coefficient estimates from maximizing the likelihood numerically are identical to OLS.

Doing it in R

cows <- data.frame(y = c(10, 12, 15, 18, 20, 25), x1 = 1:6, x2 = c(2, 1, 3, 2, 4, 5))
fit <- lm(y ~ x1 + x2, data = cows)
n <- 6; p <- 3; SSres <- deviance(fit)
c(OLS = SSres / (n - p), ML = SSres / n, bias_factor = (n - p) / n)
#>         OLS          ML bias_factor 
#>   0.7664729   0.3832364   0.5000000
logLik(fit)
#> 'log Lik.' -5.636322 (df=4)
X <- model.matrix(fit)
negll <- function(th) { s2 <- exp(th[4]); r <- cows$y - X %*% th[1:3]
                        0.5 * n * log(2 * pi * s2) + sum(r^2) / (2 * s2) }
opt <- optim(c(mean(cows$y), 0, 0, 0), negll, method = "BFGS")
rbind(ML = c(opt$par[1:3], sigma2 = exp(opt$par[4])), OLS = c(coef(fit), SSres / n))
#>                                    sigma2
#> ML  6.279074 2.683139 0.3517433 0.3832362
#> OLS 6.279070 2.683140 0.3517442 0.3832364

5.6.2 Practical 5.2: Gauss–Markov in action

For the model \(y_i=\beta x_i+\varepsilon_i\) (through the origin) with \(x=(1,2,3,4)\), compare the variance of the least squares estimator \(\hat\beta=\sum x_iy_i/\sum x_i^2\) with that of the unbiased “ratio” estimator \(\tilde\beta=\sum y_i/\sum x_i\) and the “average slope” \(\check\beta=\frac1n\sum(y_i/x_i)\).

Solution

All three are linear and unbiased. Their variances are

\[V(\hat\beta)=\frac{\sigma^2}{\sum x_i^2}=\frac{\sigma^2}{30}=0.0333\sigma^2,\qquad V(\tilde\beta)=\frac{n\sigma^2}{(\sum x_i)^2}=\frac{4\sigma^2}{100}=0.04\sigma^2,\]

\[V(\check\beta)=\frac{\sigma^2}{n^2}\sum\frac1{x_i^2}=\frac{\sigma^2}{16}\left(1+\tfrac14+\tfrac19+\tfrac1{16}\right)=0.0889\sigma^2.\]

The least squares estimator has the smallest variance, as the Gauss–Markov theorem guarantees. The simulation below confirms this.

Doing it in R

set.seed(567); x <- 1:4; beta <- 2
est <- replicate(20000, {
  y <- beta * x + rnorm(4)
  c(LS = sum(x * y) / sum(x^2), ratio = sum(y) / sum(x), avg = mean(y / x))
})
rowMeans(est)                    # all close to 2: unbiased
#>       LS    ratio      avg 
#> 2.000050 2.000284 2.000417
apply(est, 1, var)               # LS has the smallest variance
#>         LS      ratio        avg 
#> 0.03301223 0.03999283 0.08935716
c(1 / 30, 4 / 100, sum(1 / x^2) / 16)   # theoretical variances (sigma^2 = 1)
#> [1] 0.03333333 0.04000000 0.08897569

5.7 Chapter Summary

Fill in the blanks

Answers are given at the end of the chapter.

  1. The likelihood function is the __________ density of the errors regarded as a function of the parameters.

  2. Under normal errors, the MLE of \(\boldsymbol\beta\) is __________ the OLSE of \(\boldsymbol\beta\).

  3. The MLE of \(\sigma^2\) is \(\tilde\sigma^2=\) __________.

  4. \(E(\tilde\sigma^2)=\) __________, so \(\tilde\sigma^2\) is biased.

  5. The triplet \((\mathbf y,\mathbf X\boldsymbol\beta,\sigma^2\mathbf I)\) is called the __________ set-up.

  6. A linear parametric function \(\mathbf q'\boldsymbol\beta\) is estimable if \(\mathbf q'=\) __________ for some \(\mathbf k\).

  7. A matrix \(\mathbf G\) with \(\mathbf A\mathbf G\mathbf A=\mathbf A\) is called a __________ of \(\mathbf A\).

  8. BLUE stands for __________.

  9. The Gauss–Markov theorem does not require the assumption of __________.

  10. If \(V(\boldsymbol\varepsilon)=\sigma^2\mathbf V\), the BLUE is the __________ least squares estimator.

Short-answer questions

  1. Write the likelihood function of the normal linear regression model.

  2. Derive the MLE of \(\boldsymbol\beta\) and \(\sigma^2\).

  3. Show that the MLE of \(\sigma^2\) is biased and find its bias.

  4. Compare OLSE and MLE in linear regression.

  5. Define the Gauss–Markov set-up.

  6. What is meant by an estimable linear parametric function?

  7. State and prove the Gauss–Markov theorem.

  8. Why is normality not needed for the Gauss–Markov theorem?

  9. Can a biased estimator be better than the BLUE? Explain.

  10. Give the full rank proof of the Gauss–Markov theorem.

Numerical and conceptual questions

Answers are given at the end of the chapter.

  1. In a regression with \(n=20\), \(p=4\), \(SS_{Res}=48\), find \(s^2\) and \(\tilde\sigma^2\).

  2. For Question 1, find the bias of \(\tilde\sigma^2\) if \(\sigma^2=3\).

  3. For what sample size is the bias of \(\tilde\sigma^2\) less than 5% of \(\sigma^2\) when \(p=5\)?

  4. Write \(\ln L\) at its maximum in terms of \(SS_{Res}\) and \(n\).

  5. Two linear unbiased estimators of \(\beta_1\) have variances \(0.40\) and \(0.25\), and the OLSE has variance \(0.25\). Which is BLUE and why?

  6. In the model \(y_{ij}=\mu+\tau_i+\varepsilon_{ij}\) with two treatments, is \(\tau_1\) estimable? Is \(\tau_1-\tau_2\)?

  7. Show that \(\mathbf G=(\mathbf X'\mathbf X)^{-1}\) satisfies the definition of a g-inverse when \(\mathbf X'\mathbf X\) is non-singular.

  8. If \(\mathbf C\mathbf y\) is unbiased for \(\boldsymbol\beta\) with \(\mathbf C=(\mathbf X'\mathbf X)^{-1}\mathbf X'+\mathbf D\), show that \(\mathbf D\mathbf X=\mathbf 0\).

Important formulae

Log-likelihood:

\[ \ln L=-\frac n2\ln(2\pi\sigma^2)-\frac1{2\sigma^2}(\mathbf y-\mathbf X\boldsymbol\beta)'(\mathbf y-\mathbf X\boldsymbol\beta) \]

Maximum likelihood estimators:

\[ \tilde{\boldsymbol\beta}=(\mathbf X'\mathbf X)^{-1}\mathbf X'\mathbf y,\qquad\tilde\sigma^2=\frac{SS_{Res}}n=\frac{n-p}ns^2 \]

Least squares solution with a g-inverse:

\[ \boldsymbol\beta^0=\mathbf G\mathbf X'\mathbf y,\qquad V(\mathbf q'\boldsymbol\beta^0)=\sigma^2\mathbf q'\mathbf G\mathbf q \]

Key step of the Gauss–Markov proof:

\[ V(\mathbf q'\boldsymbol\beta^0-\mathbf k'\mathbf y)=V(\mathbf k'\mathbf y)-V(\mathbf q'\boldsymbol\beta^0)\ge0 \]

Quick revision

  • Normal errors → MLE of \(\boldsymbol\beta\) = OLSE; MLE of \(\sigma^2\) = \(SS_{Res}/n\) (biased).
  • \(s^2=SS_{Res}/(n-p)\) → unbiased; preferred in small samples.
  • Gauss–Markov set-up → \((\mathbf y,\mathbf X\boldsymbol\beta,\sigma^2\mathbf I)\), no normality.
  • Estimable \(\mathbf q'\boldsymbol\beta\) → \(\mathbf q'=\mathbf k'\mathbf X\).
  • Gauss–Markov theorem → OLSE is BLUE.
  • Correlated or unequal error variances → generalized least squares is BLUE.

Answers to fill in the blanks

1. Joint 2. Equal to 3. \(SS_{Res}/n\) 4. \(\frac{n-p}{n}\sigma^2\) 5. Gauss–Markov 6. \(\mathbf k'\mathbf X\) 7. Generalized inverse 8. Best linear unbiased estimator 9. Normality 10. Generalized (weighted)

Solutions to numerical and conceptual questions

  1. \(s^2=48/16=3.0\); \(\tilde\sigma^2=48/20=2.4\) (Equation 5.4).

  2. By Equation 5.5, bias \(=-p\sigma^2/n=-4(3)/20=-0.6\).

  3. \(p/n<0.05\Rightarrow n>100\).

  4. Substituting \(\tilde\sigma^2=SS_{Res}/n\) into Equation 5.2: \(\ln L_{\max}=-\frac n2\left[\ln\left(2\pi SS_{Res}/n\right)+1\right]\).

  5. The OLSE (variance 0.25) is BLUE; by the Gauss–Markov theorem no linear unbiased estimator has smaller variance, and the BLUE is unique.

  6. \(\tau_1\) alone is not estimable (\(\mathbf X\) is not of full rank; \(\mu\) and \(\tau_1\) cannot be separated). \(\tau_1-\tau_2\) is estimable: it is the expectation of \(\bar y_1-\bar y_2\).

  7. \((\mathbf X'\mathbf X)(\mathbf X'\mathbf X)^{-1}(\mathbf X'\mathbf X)=\mathbf X'\mathbf X\).

  8. \(E(\mathbf C\mathbf y)=(\mathbf X'\mathbf X)^{-1}\mathbf X'\mathbf X\boldsymbol\beta+\mathbf D\mathbf X\boldsymbol\beta=\boldsymbol\beta+\mathbf D\mathbf X\boldsymbol\beta\); this equals \(\boldsymbol\beta\) for all \(\boldsymbol\beta\) only if \(\mathbf D\mathbf X=\mathbf 0\).