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

Short Answer

Expert verified

(a) The data in mean deviation form can be written as:

\(X = \left( {\begin{aligned}1&{ - 3.5}\\1&{ - 0.5}\\1&{1.5}\\1&{2.5}\end{aligned}} \right)\)

As the sum of all entries of the second column is 0, so the columns of are orthogonal.

(b) The normal equation is \(\left( {\begin{aligned}4&0\\0&{21}\end{aligned}} \right)\left( {\begin{aligned}{{\beta _1}}\\{{\beta _2}}\end{aligned}} \right) = \left( {\begin{aligned}9\\{7.5}\end{aligned}} \right)\). The least-squares line is \(y = \frac{9}{4} + \frac{5}{{14}}\left( {x - 5.5} \right)\).

Step by step solution

01

Find the mean of the given data

(a) The data in example 1 is: \(\left( {2,1} \right),\left( {5,2} \right),\left( {7,3} \right)\) and \(\left( {8,3} \right)\).

Find the mean of the data.

\(\begin{aligned}\bar x &= \frac{{\sum x }}{n}\\ &= \frac{{2 + 5 + 7 + 8}}{4}\\ &= \frac{{22}}{4}\\ &= 5.5\end{aligned}\)

So, the mean of the data is \(5.5\).

02

Find the value of \(x*\)

It is given that, \(x* = x - 5.5\). Find \(x* = x - 5.5\) for different values of \(x\) in the given data set.

\(\begin{aligned}x* = 2 - 5.5\\ = - 3.5\end{aligned}\)

\(\begin{aligned}x* = 5 - 5.5\\ = - 0.5\end{aligned}\)

\(\begin{aligned}x* = 7 - 5.5\\ = 1.5\end{aligned}\)

\(\begin{aligned}x* = 8 - 5.5\\ = 2.5\end{aligned}\)

So, the data in mean deviation form can be written as,

\(X = \left( {\begin{aligned}1&{ - 3.5}\\1&{ - 0.5}\\1&{1.5}\\1&{2.5}\end{aligned}} \right)\)

03

Determine whether \(X\) is orthogonal

On adding the elements of the second column of \(X\), the value is 0, so the columns of \(X\) are orthogonal.

04

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.

05

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

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

Design matrix: \(X = \left( {\begin{aligned}1&{ - 3.5}\\1&{ - 0.5}\\1&{1.5}\\1&{2.5}\end{aligned}} \right)\)

Observational matrix: \({\bf{y}} = \left( {\begin{aligned}1\\2\\3\\3\end{aligned}} \right)\)

And the parameter vectorfor the given equation is,

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

06

Normal equation

The normal equation is given by,

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

07

Find least-squares line

(b)

The normal equation is\({X^T}X\beta = {X^T}{\bf{y}}\), find \(\beta \) for the given data by using the normal equation.

\(\begin{aligned}\left( {{{\left( {\begin{aligned}1&{ - 3.5}\\1&{ - 0.5}\\1&{1.5}\\1&{2.5}\end{aligned}} \right)}^T}\left( {\begin{aligned}1&{ - 3.5}\\1&{ - 0.5}\\1&{1.5}\\1&{2.5}\end{aligned}} \right)} \right)\beta & = {\left( {\begin{aligned}1&{ - 3.5}\\1&{ - 0.5}\\1&{1.5}\\1&{2.5}\end{aligned}} \right)^T}\left( {\begin{aligned}1\\2\\3\\3\end{aligned}} \right)\\\left( {\begin{aligned}4&0\\0&{21}\end{aligned}} \right)\beta & = \left( {\begin{aligned}9\\{7.5}\end{aligned}} \right)\\\left( {\begin{aligned}{{\beta _1}}\\{{\beta _2}}\end{aligned}} \right) &= {\left( {\begin{aligned}4&0\\0&{21}\end{aligned}} \right)^{ - 1}}\left( {\begin{aligned}9\\{7.5}\end{aligned}} \right)\\ &= \frac{1}{{84}}\left( {\begin{aligned}{21}&0\\0&4\end{aligned}} \right)\left( {\begin{aligned}9\\{7.5}\end{aligned}} \right)\end{aligned}\)

Solve further,

\(\begin{aligned}\left( {{{\left( {\begin{aligned}1&{ - 3.5}\\1&{ - 0.5}\\1&{1.5}\\1&{2.5}\end{aligned}} \right)}^T}\left( {\begin{aligned}1&{ - 3.5}\\1&{ - 0.5}\\1&{1.5}\\1&{2.5}\end{aligned}} \right)} \right)\beta & = \left( {\begin{aligned}{\frac{1}{4}}&0\\0&{\frac{1}{{21}}}\end{aligned}} \right)\left( {\begin{aligned}9\\{7.5}\end{aligned}} \right)\\ &= \left( {\begin{aligned}{\frac{9}{4}}\\{\frac{{7.5}}{{21}}}\end{aligned}} \right)\\ &= \left( {\begin{aligned}{\frac{9}{4}}\\{\frac{5}{{14}}}\end{aligned}} \right)\end{aligned}\)

Substitute the obtained values into \(y = {\beta _0} + {\beta _1}x*\).

\(y = \frac{9}{4} + \frac{5}{{14}}\left( {x - 5.5} \right)\)

Hence, the required least-squares line is \(y = \frac{9}{4} + \frac{5}{{14}}\left( {x - 5.5} \right)\).

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

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.

Let \(\left\{ {{{\bf{v}}_1}, \ldots ,{{\bf{v}}_p}} \right\}\) be an orthonormal set in \({\mathbb{R}^n}\). Verify the following inequality, called Bessel’s inequality, which is true for each x in \({\mathbb{R}^n}\):

\({\left\| {\bf{x}} \right\|^2} \ge {\left| {{\bf{x}} \cdot {{\bf{v}}_1}} \right|^2} + {\left| {{\bf{x}} \cdot {{\bf{v}}_2}} \right|^2} + \ldots + {\left| {{\bf{x}} \cdot {{\bf{v}}_p}} \right|^2}\)

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 \(SS\left( R \right)\).

(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 -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 \(y\)-values.

20. Show that \({\left\| {X\hat \beta } \right\|^2} = {\hat \beta ^T}{X^T}{\bf{y}}\). (Hint: Rewrite the left side and use the fact that \(\hat \beta \) satisfies the normal equations.) This formula for is used in statistics. From this and from Exercise 19, obtain the standard formula for \(SS\left( E \right)\):

\(SS\left( E \right) = {y^T}y - \hat \beta {X^T}y\)

[M] Let \({f_{\bf{4}}}\) and \({f_{\bf{5}}}\) be the fourth-order and fifth order Fourier approximations in \(C\left[ {{\bf{0}},{\bf{2}}\pi } \right]\) to the square wave function in Exercise 10. Produce separate graphs of \({f_{\bf{4}}}\) and \({f_{\bf{5}}}\) on the interval \(\left[ {{\bf{0}},{\bf{2}}\pi } \right]\), and produce graph of \({f_{\bf{5}}}\) on \(\left[ { - {\bf{2}}\pi ,{\bf{2}}\pi } \right]\).

Use the Gram–Schmidt process as in Example 2 to produce an orthogonal basis for the column space of

\(A = \left( {\begin{aligned}{{}{r}}{ - 10}&{13}&7&{ - 11}\\2&1&{ - 5}&3\\{ - 6}&3&{13}&{ - 3}\\{16}&{ - 16}&{ - 2}&5\\2&1&{ - 5}&{ - 7}\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