Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

In Exercises 1-4, find the equation \(y = {\beta _0} + {\beta _1}x\) of the least-square line that best fits the given data points.

  1. \(\left( { - 1,0} \right),\left( {0,1} \right),\left( {1,2} \right),\left( {2,4} \right)\)

Short Answer

Expert verified

The equation of the least-square line that best fits is \(y = 1.1 + 1.3x\).

Step by step solution

01

The design matrix X and observation vector y

Use the x and y coordinates to find the \(X\) and \(y\) matrices.

\(X = \left[ {\begin{aligned}1&{ - 1}\\1&0\\1&1\\1&2\end{aligned}} \right]\) and \(y = \left[ {\begin{aligned}0\\1\\2\\4\end{aligned}} \right]\)

02

Obtain the normal equations

The normal equation of \(X\beta = y\) can be obtained using \({X^T}X\beta = {X^T}y\) which is equivalent to \(\beta = {\left( {{X^T}X} \right)^{ - 1}}{X^T}y\).

Find \({X^T}X\) as follows:

\(\begin{aligned}{X^T}X &= \left[ {\begin{aligned}1&1&1&1\\{ - 1}&0&1&2\end{aligned}} \right]\left[ {\begin{aligned}1&{ - 1}\\1&0\\1&1\\1&2\end{aligned}} \right]\\ &= \left[ {\begin{aligned}{1 + 1 + 1 + 1}&{ - 1 + 0 + 1 + 2}\\{ - 1 + 0 + 1 + 2}&{1 + 0 + 1 + 4}\end{aligned}} \right]\\ &= \left[ {\begin{aligned}4&2\\2&6\end{aligned}} \right]\end{aligned}\)

Find the inverse of \({X^T}X\) as follows:

\(\begin{aligned}{\left( {{X^T}X} \right)^{ - 1}} &= {\left[ {\begin{aligned}4&2\\2&6\end{aligned}} \right]^{ - 1}}\\ &= \frac{1}{{24 - 4}}\left[ {\begin{aligned}6&{ - 2}\\{ - 2}&4\end{aligned}} \right]\\ &= \frac{1}{{20}}\left[ {\begin{aligned}6&{ - 2}\\{ - 2}&4\end{aligned}} \right]\end{aligned}\)

Find \({X^T}y\) as follows:

\(\begin{aligned}{X^T}y &= \left[ {\begin{aligned}1&1&1&1\\{ - 1}&0&1&2\end{aligned}} \right]\left[ {\begin{aligned}0\\1\\2\\4\end{aligned}} \right]\\ &= \left[ {\begin{aligned}{0 + 1 + 2 + 4}\\{0 + 0 + 2 + 8}\end{aligned}} \right]\\ &= \left[ {\begin{aligned}7\\{10}\end{aligned}} \right]\end{aligned}\)

03

Solve the normal equation

Substitute the calculated values in \(\beta = {\left( {{X^T}X} \right)^{ - 1}}{X^T}y\) and solve it as follows:

\(\begin{aligned}\beta &= {\left( {{X^T}X} \right)^{ - 1}}{X^T}y\\\beta &= \frac{1}{{20}}\left[ {\begin{aligned}6&{ - 2}\\{ - 2}&4\end{aligned}} \right]\left[ {\begin{aligned}7\\{10}\end{aligned}} \right]\\\beta &= \frac{1}{{20}}\left[ {\begin{aligned}{42 - 20}\\{ - 14 + 40}\end{aligned}} \right]\\\beta &= \frac{1}{{20}}\left[ {\begin{aligned}{22}\\{26}\end{aligned}} \right]\\\left[ {\begin{aligned}{{\beta _0}}\\{{\beta _1}}\end{aligned}} \right] &= \left[ {\begin{aligned}{1.1}\\{1.3}\end{aligned}} \right]\end{aligned}\)

Hence, the equation of the least-square line that best fits is \(y = 1.1 + 1.3x\).

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Compute the quantities in Exercises 1-8 using the vectors

\({\mathop{\rm u}\nolimits} = \left( {\begin{aligned}{*{20}{c}}{ - 1}\\2\end{aligned}} \right),{\rm{ }}{\mathop{\rm v}\nolimits} = \left( {\begin{aligned}{*{20}{c}}4\\6\end{aligned}} \right),{\rm{ }}{\mathop{\rm w}\nolimits} = \left( {\begin{aligned}{*{20}{c}}3\\{ - 1}\\{ - 5}\end{aligned}} \right),{\rm{ }}{\mathop{\rm x}\nolimits} = \left( {\begin{aligned}{*{20}{c}}6\\{ - 2}\\3\end{aligned}} \right)\)

  1. \({\mathop{\rm u}\nolimits} \cdot {\mathop{\rm u}\nolimits} ,{\rm{ }}{\mathop{\rm v}\nolimits} \cdot {\mathop{\rm u}\nolimits} ,\,\,{\mathop{\rm and}\nolimits} \,\,\frac{{{\mathop{\rm v}\nolimits} \cdot {\mathop{\rm u}\nolimits} }}{{{\mathop{\rm u}\nolimits} \cdot {\mathop{\rm u}\nolimits} }}\)

Question: In Exercises 1 and 2, you may assume that\(\left\{ {{{\bf{u}}_{\bf{1}}},...,{{\bf{u}}_{\bf{4}}}} \right\}\)is an orthogonal basis for\({\mathbb{R}^{\bf{4}}}\).

2.\({{\bf{u}}_{\bf{1}}} = \left[ {\begin{aligned}{\bf{1}}\\{\bf{2}}\\{\bf{1}}\\{\bf{1}}\end{aligned}} \right]\),\({{\bf{u}}_{\bf{2}}} = \left[ {\begin{aligned}{ - {\bf{2}}}\\{\bf{1}}\\{ - {\bf{1}}}\\{\bf{1}}\end{aligned}} \right]\),\({{\bf{u}}_{\bf{3}}} = \left[ {\begin{aligned}{\bf{1}}\\{\bf{1}}\\{ - {\bf{2}}}\\{ - {\bf{1}}}\end{aligned}} \right]\),\({{\bf{u}}_{\bf{4}}} = \left[ {\begin{aligned}{ - {\bf{1}}}\\{\bf{1}}\\{\bf{1}}\\{ - {\bf{2}}}\end{aligned}} \right]\),\({\bf{x}} = \left[ {\begin{aligned}{\bf{4}}\\{\bf{5}}\\{ - {\bf{3}}}\\{\bf{3}}\end{aligned}} \right]\)

Write v as the sum of two vectors, one in\({\bf{Span}}\left\{ {{{\bf{u}}_1}} \right\}\)and the other in\({\bf{Span}}\left\{ {{{\bf{u}}_2},{{\bf{u}}_3},{{\bf{u}}_{\bf{4}}}} \right\}\).

In Exercises 17 and 18, all vectors and subspaces are in \({\mathbb{R}^n}\). Mark each statement True or False. Justify each answer.

a. If \(W = {\rm{span}}\left\{ {{x_1},{x_2},{x_3}} \right\}\) with \({x_1},{x_2},{x_3}\) linearly independent,

and if \(\left\{ {{v_1},{v_2},{v_3}} \right\}\) is an orthogonal set in \(W\) , then \(\left\{ {{v_1},{v_2},{v_3}} \right\}\) is a basis for \(W\) .

b. If \(x\) is not in a subspace \(W\) , then \(x - {\rm{pro}}{{\rm{j}}_W}x\) is not zero.

c. In a \(QR\) factorization, say \(A = QR\) (when \(A\) has linearly

independent columns), the columns of \(Q\) form an

orthonormal basis for the column space of \(A\).

In Exercises 1-6, the given set is a basis for a subspace W. Use the Gram-Schmidt process to produce an orthogonal basis for W.

6. \(\left( {\begin{aligned}{{}}3\\{ - 1}\\2\\{ - 1}\end{aligned}} \right),\left( {\begin{aligned}{{}}{ - 5}\\9\\{ - 9}\\3\end{aligned}} \right)\)

Let \(U\) be an \(n \times n\) orthogonal matrix. Show that if \(\left\{ {{{\bf{v}}_1}, \ldots ,{{\bf{v}}_n}} \right\}\) is an orthonormal basis for \({\mathbb{R}^n}\), then so is \(\left\{ {U{{\bf{v}}_1}, \ldots ,U{{\bf{v}}_n}} \right\}\).

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free