/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Q2E In Exercises 1-4, find the equat... [FREE SOLUTION] | 91Ó°ÊÓ

91Ó°ÊÓ

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( {2,1} \right),\left( {4,2} \right),\left( {5,3} \right)\)

Short Answer

Expert verified

The equation of the least-square line that best fits is \(y = - 0.6 + 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&1\\1&2\\1&4\\1&5\end{aligned}} \right]\) and \(y = \left[ {\begin{aligned}0\\1\\2\\3\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&2&4&5\end{aligned}} \right]\left[ {\begin{aligned}1&1\\1&2\\1&4\\1&5\end{aligned}} \right]\\ &= \left[ {\begin{aligned}{1 + 1 + 1 + 1}&{1 + 2 + 4 + 5}\\{1 + 2 + 4 + 5}&{1 + 4 + 16 + 25}\end{aligned}} \right]\\ &= \left[ {\begin{aligned}4&{12}\\{12}&{46}\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&{12}\\{12}&{46}\end{aligned}} \right]^{ - 1}}\\ &= \frac{1}{{184 - 144}}\left[ {\begin{aligned}{46}&{ - 12}\\{ - 12}&4\end{aligned}} \right]\\ &= \frac{1}{{40}}\left[ {\begin{aligned}{46}&{ - 12}\\{ - 12}&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&2&4&5\end{aligned}} \right]\left[ {\begin{aligned}0\\1\\2\\3\end{aligned}} \right]\\ &= \left[ {\begin{aligned}{0 + 1 + 2 + 3}\\{0 + 2 + 8 + 15}\end{aligned}} \right]\\ &= \left[ {\begin{aligned}6\\{25}\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}{46}&{ - 12}\\{ - 12}&4\end{aligned}} \right]\left[ {\begin{aligned}6\\{25}\end{aligned}} \right]\\\beta &= \frac{1}{{40}}\left[ {\begin{aligned}{276 - 300}\\{ - 72 + 100}\end{aligned}} \right]\\\beta &= \frac{1}{{40}}\left[ {\begin{aligned}{ - 24}\\{28}\end{aligned}} \right]\\\left[ {\begin{aligned}{{\beta _0}}\\{{\beta _1}}\end{aligned}} \right] &= \left[ {\begin{aligned}{ - 0.6}\\{0.7}\end{aligned}} \right]\end{aligned}\)

Hence, the equation of the least-square line that best fits is \(y = - 0.6 + 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 91Ó°ÊÓ!

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

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

5. \(A = \left( {\begin{aligned}{{}{}}{\bf{1}}&{\bf{1}}&{\bf{0}}\\{\bf{1}}&{\bf{1}}&{\bf{0}}\\{\bf{1}}&{\bf{0}}&{\bf{1}}\\{\bf{1}}&{\bf{0}}&{\bf{1}}\end{aligned}} \right)\), \({\bf{b}} = \left( {\begin{aligned}{{}{}}{\bf{1}}\\{\bf{3}}\\{\bf{8}}\\{\bf{2}}\end{aligned}} \right)\)

In Exercises 9-12 find (a) the orthogonal projection of b onto \({\bf{Col}}A\) and (b) a least-squares solution of \(A{\bf{x}} = {\bf{b}}\).

12. \(A = \left[ {\begin{array}{{}{}}{\bf{1}}&{\bf{1}}&{\bf{0}}\\{\bf{1}}&{\bf{0}}&{ - {\bf{1}}}\\{\bf{0}}&{\bf{1}}&{\bf{1}}\\{ - {\bf{1}}}&{\bf{1}}&{ - {\bf{1}}}\end{array}} \right]\), \({\bf{b}} = \left( {\begin{array}{{}{}}{\bf{2}}\\{\bf{5}}\\{\bf{6}}\\{\bf{6}}\end{array}} \right)\)

Find an orthogonal basis for the column space of each matrix in Exercises 9-12.

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

Let \({\mathbb{R}^{\bf{2}}}\) have the inner product of Example 1. Show that the Cauchy-Schwarz inequality holds for \({\bf{x}} = \left( {{\bf{3}}, - {\bf{2}}} \right)\) and \({\bf{y}} = \left( { - {\bf{2}},{\bf{1}}} \right)\). (Suggestion: Study \({\left| {\left\langle {{\bf{x}},{\bf{y}}} \right\rangle } \right|^{\bf{2}}}\).)

a. Rewrite the data in Example 1 with new \(x\)-coordinates in mean deviation form. Let \(X\) be the associated design matrix. Why are the columns of \(X\) orthogonal?

b. Write the normal equations for the data in part (a), and solve them to find the least-squares line, \(y = {\beta _0} + {\beta _1}x*\), where \(x* = x - 5.5\).

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.