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

Given data for a least-squares problem, \(\left( {{x_1},{y_1}} \right), \ldots ,\left( {{x_n},{y_n}} \right)\), the following abbreviations are helpful:

\(\begin{aligned}{l}\sum x = \sum\nolimits_{i = 1}^n {{x_i}} ,{\rm{ }}\sum {{x^2}} = \sum\nolimits_{i = 1}^n {x_i^2} ,\\\sum y = \sum\nolimits_{i = 1}^n {{y_i}} ,{\rm{ }}\sum {xy} = \sum\nolimits_{i = 1}^n {{x_i}{y_i}} \end{aligned}\)

The normal equations for a least-squares line \(y = {\hat \beta _0} + {\hat \beta _1}x\) may be written in the form

\(\begin{aligned}{c}{{\hat \beta }_0} + {{\hat \beta }_1}\sum x = \sum y \\{{\hat \beta }_0}\sum x + {{\hat \beta }_1}\sum {{x^2}} = \sum {xy} {\rm{ (7)}}\end{aligned}\)

Derive the normal equations (7) from the matrix form given in this section.

Short Answer

Expert verified

The normal equations (7) are derived by using given data points.

Step by step solution

01

The General Linear Model

The equation of the general linear model is defined as:

\({\bf{y}} = X\beta + \in \)

Where, \({\bf{y}} = \left( {\begin{aligned}{{y_1}}\\{{y_2}}\\ \vdots \\{{y_n}}\end{aligned}} \right)\) is an observational vector, \(X = \left( {\begin{aligned}1&{{x_1}}& \cdots &{x_1^n}\\1&{{x_2}}& \cdots &{x_2^n}\\ \vdots & \vdots & \ddots & \vdots \\1&{{x_n}}& \cdots &{x_n^n}\end{aligned}} \right)\) is the design matrix, \(\beta = \left( {\begin{aligned}{{\beta _1}}\\{{\beta _2}}\\ \vdots \\{{\beta _n}}\end{aligned}} \right)\) is the parameter vector, and \( \in = \left( {\begin{aligned}{{ \in _1}}\\{{ \in _2}}\\ \vdots \\{{ \in _n}}\end{aligned}} \right)\) is the residual vector.

02

Find design matrix, observation vector, parameter vector for given data

The given data points are\(\left( {{x_1},{y_1}} \right), \ldots ,\left( {{x_n},{y_n}} \right)\).

Write the design matrix and observational vector for the given data points.

Design matrix: \(X = \left( {\begin{aligned}1&{{x_1}}\\1&{{x_2}}\\ \vdots & \vdots \\1&{{x_n}}\end{aligned}} \right)\)

Observational matrix: \({\bf{y}} = \left( {\begin{aligned}{{y_1}}\\{{y_2}}\\ \vdots \\{{y_n}}\end{aligned}} \right)\)

And the parameter vectorfor the given equation is,

\({\bf{\beta }} = \left( {\begin{aligned}{{\beta _0}}\\{{\beta _1}}\end{aligned}} \right)\)

03

Normal equation

The normal equation is given by,

\({X^T}X\beta = {X^T}{\bf{y}}\)

04

Derive the normal equation

As the normal equation is\({X^T}X\beta = {X^T}{\bf{y}}\), by using this equation, derive equations (7) for the given data points.

Find \({X^T}X\) and \({X^T}{\bf{y}}\).

\(\begin{aligned}{X^T}X &= {\left( {\begin{aligned}1&{{x_1}}\\1&{{x_2}}\\ \vdots & \vdots \\1&{{x_n}}\end{aligned}} \right)^T}\left( {\begin{aligned}1&{{x_1}}\\1&{{x_2}}\\ \vdots & \vdots \\1&{{x_n}}\end{aligned}} \right)\\ &= \left( {\begin{aligned}{1 + 1 + \cdots + n{\rm{ times}}}&{{x_1} + \cdots + {x_n}}\\{{x_1} + \cdots + {x_n}}&{{x_1}{x_1} + \cdots + {x_n}{x_n}}\end{aligned}} \right)\\ &= \left( {\begin{aligned}n&{\sum x }\\{\sum x }&{\sum {{x^2}} }\end{aligned}} \right)\end{aligned}\)

\(\begin{aligned}{X^T}{\bf{y}} &= {\left( {\begin{aligned}1&{{x_1}}\\1&{{x_2}}\\ \vdots & \vdots \\1&{{x_n}}\end{aligned}} \right)^T}\left( {\begin{aligned}{{y_1}}\\{{y_2}}\\ \vdots \\{{y_n}}\end{aligned}} \right)\\ &= \left( {\begin{aligned}{{y_1} + \cdots + {y_n}}\\{{x_1}{y_1} + \cdots + {x_n}{y_n}}\end{aligned}} \right)\\ &= \left( {\begin{aligned}{\sum y }\\{\sum {xy} }\end{aligned}} \right)\end{aligned}\)

Then, the equation \({X^T}X\beta = {X^T}{\bf{y}}\) becomes:

\(\begin{aligned}\left( {\begin{aligned}n&{\sum x }\\{\sum x }&{\sum {{x^2}} }\end{aligned}} \right)\left( {\begin{aligned}{{{\hat \beta }_0}}\\{{{\hat \beta }_1}}\end{aligned}} \right) &= \left( {\begin{aligned}{\sum y }\\{\sum {xy} }\end{aligned}} \right)\\\left( {\begin{aligned}{n{{\hat \beta }_0} + {{\hat \beta }_1}\sum x }\\{{{\hat \beta }_0}\sum x + {{\hat \beta }_1}\sum {{x^2}} }\end{aligned}} \right) &= \left( {\begin{aligned}{\sum y }\\{\sum {xy} }\end{aligned}} \right)\end{aligned}\)

Write the obtained system in the form of equations.

\(\begin{aligned}n{{\hat \beta }_0} + {{\hat \beta }_1}\sum x = \sum y \\{{\hat \beta }_0}\sum x + {{\hat \beta }_1}\sum {{x^2}} = \sum {xy} \end{aligned}\)

These are the required equations.

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

Suppose the x-coordinates of the data \(\left( {{x_1},{y_1}} \right), \ldots ,\left( {{x_n},{y_n}} \right)\) are in mean deviation form, so that \(\sum {{x_i}} = 0\). Show that if \(X\) is the design matrix for the least-squares line in this case, then \({X^T}X\) is a diagonal matrix.

Compute the least-squares error associated with the least square solution found in Exercise 4.

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\}\).

In Exercises 7โ€“10, let\[W\]be the subspace spanned by the\[{\bf{u}}\]โ€™s, and write y as the sum of a vector in\[W\]and a vector orthogonal to\[W\].

7.\[y = \left[ {\begin{aligned}1\\3\\5\end{aligned}} \right]\],\[{{\bf{u}}_1} = \left[ {\begin{aligned}1\\3\\{ - 2}\end{aligned}} \right]\],\[{{\bf{u}}_2} = \left[ {\begin{aligned}5\\1\\4\end{aligned}} \right]\]

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)\)

7. \(\left\| {\mathop{\rm w}\nolimits} \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