One of the reasons that we want to introduce Matrix to linear regression is that it has greater generality. We could use simpler notations to represent the model. You may first feel not familiar, just try to get used to it.
Recall the classic notation of Simple Linear Regression:
We change the notation a bit…
Now, considering there are equations here, we could rewrite the group as:
- denotes an matrix:
- the two-element column vector (In the Simple Linear Regression, we only have those two):
- and an error vector.
In short, we could rewrite the Simple Linear Regression in this way:
Recall the assumption of Simple Linear Regression, we could represent the error terms as:
这里缺一个引用,关于assumption的
Hint: Just a multiplication:
the estimator of is now .
Take the FOC here:
If you are not familiar with how to take derivatives under Matrix environment, see attached: 矩阵求导. In here, we conclude some useful results of differentiation of vectors:
So it is clear that
Thus,
To obtain the correct value of , we continue calculating:
This is what we want to know.