Assume that we have collected data from one thousand patients from a hospital: (\mathbf X_1,Y_1), \ldots , (\mathbf X_{1000},Y_{1000}), where each \mathbf X_ i = \left( \begin{array}{c} 1 \\ X^{(1)} \\ \vdots \\ X^{(4)} \end{array} \right) is a column vector containing four different measurements: X^{(1)} is age, X^{(2)} is height, X^{(3)} is heart rate,X^{(4)} is blood pressure. We also include a constant covariate, X^{(0)} = 1 by convention to allow for an intercept \beta _0. On the other hand, Y_ i represents the individual's cholesterol level. In order to understand how these four measurements correlate with cholesterol level, we perform a linear regression (regardless of whether this is truly a linear relationship).

Setting up the equation for linear regression, we get

\mathbf Y= \mathbb {X}{\boldsymbol \beta }+ {\boldsymbol \varepsilon },

where \mathbf Y is the column vector of dependent variables,

\mathbb {X} = \left( \begin{array}{c} \mathbf X_1^ T \\ \hline \mathbf X_2^ T \\ \hline \vdots \\ \hline \mathbf X_{1000}^ T \end{array} \right)

is the design matrix of covariates

and {\boldsymbol \varepsilon }= (\varepsilon _1, \ldots \varepsilon _{1000})^ T is the (random) vector representing the error \mathbf Y- \mathbb {X}{\boldsymbol \beta }.

In the given setup, what are the dimensions of \mathbf Y and {\boldsymbol \varepsilon }?

unanswered rows \times
unanswered columns
What are the dimensions of \mathbb {X}?

unanswered rows \times
unanswered columns
What are the dimensions of {\boldsymbol \beta }?

unanswered rows \times
unanswered columns

The dimension of Y is (1000 rows) x (1 column).

The dimension of ε (epsilon) is (1000 rows) x (1 column).

The dimension of X is (1000 rows) x (5 columns) because each X_i contains 4 measurements plus the constant covariate.

The dimension of β (beta) is (5 rows) x (1 column) because there are 5 covariates, including the intercept.

In the given setup, the dimensions of 𝐘 are:

1000 rows × 1 column

The dimensions of 𝜖 (epsilon) are:

1000 rows × 1 column

The dimensions of 𝐗 are:

1000 rows × 5 columns

The dimensions of 𝛽 (beta) are:

5 rows × 1 column