Respuesta :
We're looking for a line of best fit of the form [tex]\hat y=c_1x+c_0[/tex]. Set up a matrix equation:
[tex]\begin{bmatrix}1&1\\3&1\\5&1\end{bmatrix}\begin{bmatrix}c_1\\c_0\end{bmatrix}=\begin{bmatrix}5\\13\\21\end{bmatrix}[/tex]
Multiply both sides on the left by the transpose of the coefficient matrix:
[tex]\begin{bmatrix}1&3&5\\1&1&1\end{bmatrix}\begin{bmatrix}1&1\\3&1\\5&1\end{bmatrix}\begin{bmatrix}c_1\\c_0\end{bmatrix}=\begin{bmatrix}1&3&5\\1&1&1\end{bmatrix}\begin{bmatrix}5\\13\\21\end{bmatrix}[/tex]
[tex]\begin{bmatrix}35&9\\9&3\end{bmatrix}\begin{bmatrix}c_1\\c_0\end{bmatrix}=\begin{bmatrix}149\\39\end{bmatrix}[/tex]
Multiply both sides by the inverse of the new coefficient matrix:
[tex]\begin{bmatrix}35&9\\9&3\end{bmatrix}^{-1}\begin{bmatrix}35&9\\9&3\end{bmatrix}\begin{bmatrix}c_1\\c_0\end{bmatrix}=\begin{bmatrix}35&9\\9&3\end{bmatrix}^{-1}\begin{bmatrix}149\\39\end{bmatrix}[/tex]
[tex]\begin{bmatrix}c_1\\c_0\end{bmatrix}=\begin{bmatrix}4\\1\end{bmatrix}[/tex]
So we end up with a best-fit line of
[tex]\hat y=4x+1[/tex]
[tex]\begin{bmatrix}1&1\\3&1\\5&1\end{bmatrix}\begin{bmatrix}c_1\\c_0\end{bmatrix}=\begin{bmatrix}5\\13\\21\end{bmatrix}[/tex]
Multiply both sides on the left by the transpose of the coefficient matrix:
[tex]\begin{bmatrix}1&3&5\\1&1&1\end{bmatrix}\begin{bmatrix}1&1\\3&1\\5&1\end{bmatrix}\begin{bmatrix}c_1\\c_0\end{bmatrix}=\begin{bmatrix}1&3&5\\1&1&1\end{bmatrix}\begin{bmatrix}5\\13\\21\end{bmatrix}[/tex]
[tex]\begin{bmatrix}35&9\\9&3\end{bmatrix}\begin{bmatrix}c_1\\c_0\end{bmatrix}=\begin{bmatrix}149\\39\end{bmatrix}[/tex]
Multiply both sides by the inverse of the new coefficient matrix:
[tex]\begin{bmatrix}35&9\\9&3\end{bmatrix}^{-1}\begin{bmatrix}35&9\\9&3\end{bmatrix}\begin{bmatrix}c_1\\c_0\end{bmatrix}=\begin{bmatrix}35&9\\9&3\end{bmatrix}^{-1}\begin{bmatrix}149\\39\end{bmatrix}[/tex]
[tex]\begin{bmatrix}c_1\\c_0\end{bmatrix}=\begin{bmatrix}4\\1\end{bmatrix}[/tex]
So we end up with a best-fit line of
[tex]\hat y=4x+1[/tex]