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.

4. \(\left( {2,3} \right),\left( {3,2} \right),\left( {5,1} \right),\left( {6,0} \right)\)

Short Answer

Expert verified

The equation of the least-square line that best fits is \(y = 4.3 - 0.7x\).

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&2\\1&3\\1&5\\1&6\end{aligned}} \right]\) and \(y = \left[ {\begin{aligned}3\\2\\1\\0\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\\2&3&5&6\end{aligned}} \right]\left[ {\begin{aligned}1&2\\1&3\\1&5\\1&6\end{aligned}} \right]\\ &= \left[ {\begin{aligned}{1 + 1 + 1 + 1}&{2 + 3 + 5 + 6}\\{2 + 3 + 5 + 6}&{4 + 9 + 25 + 36}\end{aligned}} \right]\\ &= \left[ {\begin{aligned}4&{16}\\{16}&{74}\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&{16}\\{16}&{74}\end{aligned}} \right]^{ - 1}}\\ &= \frac{1}{{296 - 256}}\left[ {\begin{aligned}{74}&{ - 16}\\{ - 16}&4\end{aligned}} \right]\\ &= \frac{1}{{40}}\left[ {\begin{aligned}{74}&{ - 16}\\{ - 16}&4\end{aligned}} \right]\end{aligned}\)

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

\(\begin{aligned}{X^T}y &= \left[ {\begin{aligned}1&1&1&1\\2&3&5&6\end{aligned}} \right]\left[ {\begin{aligned}3\\2\\1\\0\end{aligned}} \right]\\ &= \left[ {\begin{aligned}{3 + 2 + 1 + 0}\\{6 + 6 + 5 + 0}\end{aligned}} \right]\\ &= \left[ {\begin{aligned}6\\{17}\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}{{40}}\left[ {\begin{aligned}{74}&{ - 16}\\{ - 16}&4\end{aligned}} \right]\left[ {\begin{aligned}6\\{17}\end{aligned}} \right]\\\beta &= \frac{1}{{40}}\left[ {\begin{aligned}{444 - 272}\\{ - 96 + 68}\end{aligned}} \right]\\\beta &= \frac{1}{{40}}\left[ {\begin{aligned}{172}\\{ - 28}\end{aligned}} \right]\\\left[ {\begin{aligned}{{\beta _0}}\\{{\beta _1}}\end{aligned}} \right] &= \left[ {\begin{aligned}{4.3}\\{ - 0.7}\end{aligned}} \right]\end{aligned}\)

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

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

Exercises 19 and 20 involve a design matrix \(X\) with two or more columns and a least-squares solution \(\hat \beta \) of \({\bf{y}} = X\beta \). Consider the following numbers.

(i) \({\left\| {X\hat \beta } \right\|^2}\)—the sum of the squares of the “regression term.” Denote this number by .

(ii) \({\left\| {{\bf{y}} - X\hat \beta } \right\|^2}\)—the sum of the squares for error term. Denote this number by \(SS\left( E \right)\).

(iii) \({\left\| {\bf{y}} \right\|^2}\)—the “total” sum of the squares of the \(y\)-values. Denote this number by \(SS\left( T \right)\).

Every statistics text that discusses regression and the linear model \(y = X\beta + \in \) introduces these numbers, though terminology and notation vary somewhat. To simplify matters, assume that the mean of the -values is zero. In this case, \(SS\left( T \right)\) is proportional to what is called the variance of the set of -values.

19. Justify the equation \(SS\left( T \right) = SS\left( R \right) + SS\left( E \right)\). (Hint: Use a theorem, and explain why the hypotheses of the theorem are satisfied.) This equation is extremely important in statistics, both in regression theory and in the analysis of variance.

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.

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

In exercises 1-6, determine which sets of vectors are orthogonal.

\(\left[ {\begin{align}{ 2}\\{ - 7}\\{-1}\end{align}} \right]\), \(\left[ {\begin{align}{ - 6}\\{ - 3}\\9\end{align}} \right]\), \(\left[ {\begin{align}{ 3}\\{ 1}\\{-1}\end{align}} \right]\)

In Exercises 11 and 12, find the closest point to\[{\bf{y}}\]in the subspace\[W\]spanned by\[{{\bf{v}}_1}\], and\[{{\bf{v}}_2}\].

11.\[y = \left[ {\begin{aligned}3\\1\\5\\1\end{aligned}} \right]\],\[{{\bf{v}}_1} = \left[ {\begin{aligned}3\\1\\{ - 1}\\1\end{aligned}} \right]\],\[{{\bf{v}}_2} = \left[ {\begin{aligned}1\\{ - 1}\\1\\{ - 1}\end{aligned}} \right]\]

In Exercises 5 and 6, describe all least squares solutions of the equation \(A{\bf{x}} = {\bf{b}}\).

6.\(A = \left( {\begin{aligned}{{}{}}{\bf{1}}&{\bf{1}}&{\bf{0}}\\{\bf{1}}&{\bf{1}}&{\bf{0}}\\{\bf{1}}&{\bf{1}}&{\bf{0}}\\{\bf{1}}&{\bf{0}}&{\bf{1}}\\{\bf{1}}&{\bf{0}}&{\bf{1}}\\{\bf{1}}&{\bf{0}}&{\bf{1}}\end{aligned}} \right)\),\({\bf{b}} = \left( {\begin{aligned}{{}{}}{\bf{7}}\\{\bf{2}}\\{\bf{3}}\\{\bf{6}}\\{\bf{5}}\\{\bf{4}}\end{aligned}} \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