Find sample size of a regression with calculated matrix

1.1k Views Asked by At

The question is given like the following:

question - matrix form

And I'm wondering how can I find the sample size from these calculated metrics? Also, I'm not sure how I can find the estimator for the variance.

1

There are 1 best solutions below

0
On

Recall that the design matrix has the following form $$ X = \begin{pmatrix} 1 & x_{11} & x_{22} \\ 1 & x_{12} & x_{22}\\ : & : & : \\ 1 & x_{1n} & x_{2n} \end{pmatrix} $$ hence the $X_{11}$ entry of $X'X$ is $$ (1\quad 1\cdots 1) \begin{pmatrix} 1\\ 1\\ :\\ 1 \end{pmatrix} =\sum_{i=1}^n 1 = n . $$ Hence, your sample size is $30$.

And for the unbiased estimator of the variance, $Var(\epsilon) = \sigma^2$, you should compute $MSE = SSE/(n-2)$, where $$ SSE = Y'Y - \hat{\beta}X'Y, $$ and $\hat{\beta} = (X'X)^{-1}X'Y$.