In this chapter, we introduce the mathematical language and statistical framework that will be used throughout the course. Our focus is on the notation of vectors and matrices, vectors of random variables, expectation and covariance operators, and the basic form of the linear regression model.
Learning Objectives
By the end of this chapter, students should be able to:
use standard matrix notation for linear statistical models;
distinguish between scalars, vectors, matrices, random variables, and random vectors;
compute expectations and covariance matrices for random vectors;
interpret the linear regression model in matrix form;
understand why projection and least squares will play a central role in this course.
Linear statistical analysis is one of the central foundations of graduate statistics. Many methods that at first look different are built on the same underlying structure:
regression
analysis of variance
analysis of covariance
prediction
model comparison
and parts of generalized linear modelling
A major goal of this course is to see these topics under a unified framework.
1.2 A unifying point of view
A large part of the course can be summarized by the model
\[
Y = X\beta + \varepsilon,
\]
where
\(Y\) is a response vector,
\(X\) is a design matrix,
\(\beta\) is an unknown parameter vector,
\(\varepsilon\) is a random error vector.
This compact expression contains a great deal of statistical structure. Over the semester, we will study how to estimate \(\beta\), quantify uncertainty, test hypotheses, diagnose model failures, and make predictions.
1.3 Basic Notation
Scalars, vectors, and matrices
We use the following conventions throughout the course:
scalars are written in lowercase italic letters, such as \(a\), \(b\), \(n\);
vectors are written in bold lowercase letters, such as \(\mathbf{x}\), \(\mathbf{y}\);
matrices are written in bold uppercase letters, such as \(\mathbf{X}\), \(\mathbf{A}\);
random variables are often written in uppercase letters, such as \(Y\);
realizations of random variables are written in lowercase letters, such as \(y\).
Univariate case
A random variable is univariate if it takes values in one dimension. We write
\[
X \in \mathbb{R}.
\]
A realization, or observed value, of \(X\) is denoted by \(x\).
Some common quantities associated with a univariate random variable \(X\) include:
This is the most common starting assumption in classical linear regression.
1.4 Statistical Models
A statistical model is a set of probability distributions that may plausibly describe the data-generating mechanism.
1.4.1 General idea
Suppose we observe data \(y\) from a random quantity \(Y\). A model introduces assumptions about the distribution of \(Y\), often indexed by an unknown parameter \(\theta\).
For example:
\[
Y \sim N(\mu, \sigma^2)
\]
with unknown parameters \(\mu\) and \(\sigma^2\).
In regression, the model is not only about the marginal distribution of the response but also about how the mean changes with explanatory variables.
1.4.2 Deterministic part and random part
A useful way to think about a statistical model is:
This notation will allow us to treat simple regression, multiple regression, ANOVA, and ANCOVA in one common language.
Under the same assumption, \[
\mathbb{E}[\boldsymbol{\varepsilon}] = \mathbf{0}
\qquad \text{and} \qquad
\mathrm{Var}(\boldsymbol{\varepsilon}) = \sigma^2 \mathbf{I}_n,
\] we have the following.
These are immediate consequences of the expectation and covariance rules above.
1.5.1 Geometry Preview
A central idea in linear regression is projection.
The fitted values \(\hat{\mathbf{Y}}\) will later be obtained by projecting \(\mathbf{Y}\) onto the column space of \(\mathbf{X}\).
The column space of \(\mathbf{X}\) is
\[
\mathcal{C}(\mathbf{X})
=
\{ \mathbf{X}\boldsymbol{\beta} : \boldsymbol{\beta} \in \mathbb{R}^p \}.
\] This is the set of all mean vectors that the model can represent.
1.6 Why projection matters
The least squares estimator chooses \(\hat{\boldsymbol{\beta}}\) so that
write out the matrices \(\mathbf{Y}\), \(\mathbf{X}\), \(\boldsymbol{\beta}\), and \(\boldsymbol{\varepsilon}\) for \(n=5\) observations.
1.9 Take home Practice
Complete the following:
review matrix multiplication and transpose rules;
derive \(\mathbb{E}[\mathbf{A}\mathbf{Y}+\mathbf{b}]\) from first principles;
derive \(\mathrm{Var}(\mathbf{A}\mathbf{Y})\) using the definition of covariance;
write the simple linear regression model in matrix form for a dataset of your choice;
fit a simple regression in R and report:
the estimated coefficients,
fitted values,
residuals,
and a scatterplot with the fitted line.
1.10 Summary
This chapter introduced the notation and basic probabilistic tools needed for the rest of the course. We defined random vectors, mean vectors, covariance matrices, and the matrix form of the linear regression model. These ideas will support everything that follows.
Next chapter, we will study least squares estimation and the geometry of projection in more detail.