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

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.

Short Answer

Expert verified

It is verified that, \({X^T}X = \left( {\begin{aligned}n&0\\0&{\sum {{x^2}} }\end{aligned}} \right)\) is a diagonal matrix.

Step by step solution

01

The General Linear Model

The equation of the general linear model is given as:

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

Here, \({\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 parameter vector, and \( \in = \left( {\begin{aligned}{{ \in _1}}\\{{ \in _2}}\\ \vdots \\{{ \in _n}}\end{aligned}} \right)\) is a 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

Find \({X^T}X\)

Find\({X^T}X\).

\(\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& \cdots &1\\{{x_1}}& \cdots &{{x_n}}\end{aligned}} \right)\left( {\begin{aligned}1&{{x_1}}\\1&{{x_2}}\\ \vdots & \vdots \\1&{{x_n}}\end{aligned}} \right)\\ &= \left( {\begin{aligned}n&{\sum x }\\{\sum x }&{\sum {{x^2}} }\end{aligned}} \right)\end{aligned}\)

Hence, the matrix for \({X^T}X\) is \(\left( {\begin{aligned}n&{\sum x }\\{\sum x }&{\sum {{x^2}} }\end{aligned}} \right)\).

04

Check whether \({X^T}X\) is a diagonal matrix or not

As, \({X^T}X = \left( {\begin{aligned}n&{\sum x }\\{\sum x }&{\sum {{x^2}} }\end{aligned}} \right)\). It is given that \(\sum {{x_i}} = 0\), then,

\({X^T}X = \left( {\begin{aligned}n&0\\0&{\sum {{x^2}} }\end{aligned}} \right)\)

It can be seen that the non-diagonal elements are 0, so is a diagonal matrix.

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

In Exercises 13 and 14, the columns of Q were obtained by applying the Gram-Schmidt process to the columns of A. Find an upper triangular matrix R such that \(A = QR\). Check your work.

13. \(A = \left( {\begin{aligned}{{}{}}5&9\\1&7\\{ - 3}&{ - 5}\\1&5\end{aligned}} \right),{\rm{ }}Q = \left( {\begin{aligned}{{}{}}{\frac{5}{6}}&{ - \frac{1}{6}}\\{\frac{1}{6}}&{\frac{5}{6}}\\{ - \frac{3}{6}}&{\frac{1}{6}}\\{\frac{1}{6}}&{\frac{3}{6}}\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}}\).

10. \(A = \left[ {\begin{aligned}{{}{}}{\bf{1}}&{\bf{2}}\\{ - {\bf{1}}}&{\bf{4}}\\{\bf{1}}&{\bf{2}}\end{aligned}} \right]\), \({\bf{b}} = \left[ {\begin{aligned}{{}{}}{\bf{3}}\\{ - {\bf{1}}}\\{\bf{5}}\end{aligned}} \right]\)

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

A certain experiment produces the data \(\left( {1,1.8} \right),\left( {2,2.7} \right),\left( {3,3.4} \right),\left( {4,3.8} \right),\left( {5,3.9} \right)\). Describe the model that produces a least-squares fit of these points by a function of the form

\(y = {\beta _1}x + {\beta _2}{x^2}\)

Such a function might arise, for example, as the revenue from the sale of \(x\) units of a product, when the amount offered for sale affects the price to be set for the product.

a. Give the design matrix, the observation vector, and the unknown parameter vector.

b. Find the associated least-squares curve for the data.

A certain experiment produce the data \(\left( {1,7.9} \right),\left( {2,5.4} \right)\) and \(\left( {3, - .9} \right)\). Describe the model that produces a least-squares fit of these points by a function of the form

\(y = A\cos x + B\sin x\)

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