21.9k views
4 votes
Consider a linear regression model with 100 data points (n = 100). The model is represented as:

y_i = β_0 + β_1 * x_1,i + β_2 * x_2,i + e_i

We construct a matrix X to include the regressor data:

X = [1 ... 1]
[x_1,1 ... x_1,100]
[x_2,1 ... x_2,100]

If we compute Z = X'X, what is the dimension of matrix Z?

a. Z is a 2x100 matrix.
b. Z is a 2x2 matrix.
c. Z is a 100x100 matrix.
d. Z is a 1x100 matrix.
e. Z is a 2x1 matrix.

User Grahame A
by
8.1k points

1 Answer

1 vote

Final answer:

The dimensions of matrix Z, obtained by computing X'X in a linear regression model with n = 100 and two predictors (x1 and x2), result in a 3x3 matrix. This is because the original matrix X includes an intercept and columns for each predictor, making it a 3x100 matrix, and the transpose of X is a 100x3 matrix.

Step-by-step explanation:

You've asked about the dimensions of the matrix Z which is obtained by computing X'X in a linear regression model with two predictors.

The original matrix X is constructed with a row of 1's to represent the intercept (β_0), and one row for each of the predictor variables x_1 and x_2. Given there are 100 data points (n = 100), matrix X is of dimension 3x100, including the intercept row.

When you transpose matrix X (denoted as X'), it becomes a 100x3 matrix. The multiplication of the transposed matrix X' by the original matrix X (X'X) results in a square matrix whose dimension is the number of rows of X' by the number of columns of X. Therefore, the matrix Z is a 3x3 matrix, which matches none of the options provided in your question.

User Lowtech
by
8.3k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories