Americas
Europe
Q7E
Expert-verifiedA 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. The required matrix and vectors are,
Design Matrix: \(X = \left( {\begin{aligned}1&1\\2&4\\3&9\\4&{16}\\5&{25}\end{aligned}} \right)\)
Observation vector: \({\bf{y}} = \left( {\begin{aligned}{1.8}\\{2.7}\\{3.4}\\{3.8}\\{3.9}\end{aligned}} \right)\)
Parameter vector: \(\beta = \left( {\begin{aligned}{{\beta _1}}\\{{\beta _2}}\end{aligned}} \right)\)
b. The least-squares equation is \({\bf{y}} = 1.76x - 0.20{x^2}\).
The equation of the general linear model is defined 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
(a)
The given data points are: \(\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)\).
Write the Design matrix, observational vector, and the parameter vector for the given data by using the information given in step 1.
Design matrix:
\(\begin{aligned}X = \left( {\begin{aligned}1&{{1^2}}\\2&{{2^2}}\\3&{{3^2}}\\4&{{4^2}}\\5&{{5^2}}\end{aligned}} \right)\\ = \left( {\begin{aligned}1&1\\2&4\\3&9\\4&{16}\\5&{25}\end{aligned}} \right)\end{aligned}\)
Observational vector:
\({\bf{y}} = \left( {\begin{aligned}{1.8}\\{2.7}\\{3.4}\\{3.8}\\{3.9}\end{aligned}} \right)\)
And, the parameter vector for the given equation is shown below:
\(\beta = \left( {\begin{aligned}{{\beta _1}}\\{{\beta _2}}\end{aligned}} \right)\)
(b)
The general least-squares equation is given by \({\bf{y}} = {\beta _1}x + {\beta _2}{x^2}\), and to find the associated least-squares curve, the values of \({\beta _1},{\rm{ }}{\beta _2}\) are required, so find the values of \({\beta _1},{\rm{ }}{\beta _2}\) by using the normal equation.
By using the obtained information from step 2, the normal equation will be,
\(\left( {{{\left( {\begin{aligned}1&1\\2&4\\3&9\\4&{16}\\5&{25}\end{aligned}} \right)}^T}\left( {\begin{aligned}1&1\\2&4\\3&9\\4&{16}\\5&{25}\end{aligned}} \right)} \right)\left( {\begin{aligned}{{\beta _1}}\\{{\beta _2}}\end{aligned}} \right) = {\left( {\begin{aligned}1&1\\2&4\\3&9\\4&{16}\\5&{25}\end{aligned}} \right)^T}\left( {\begin{aligned}{1.8}\\{2.7}\\{3.4}\\{3.8}\\{3.9}\end{aligned}} \right)\)
That implies;
\(\left( {\begin{aligned}{{\beta _1}}\\{{\beta _2}}\end{aligned}} \right) = {\left( {{{\left( {\begin{aligned}1&1\\2&4\\3&9\\4&{16}\\5&{25}\end{aligned}} \right)}^T}\left( {\begin{aligned}1&1\\2&4\\3&9\\4&{16}\\5&{25}\end{aligned}} \right)} \right)^{ - 1}}{\left( {\begin{aligned}1&1\\2&4\\3&9\\4&{16}\\5&{25}\end{aligned}} \right)^T}\left( {\begin{aligned}{1.8}\\{2.7}\\{3.4}\\{3.8}\\{3.9}\end{aligned}} \right)\)
Use the following steps to find the associated values for the obtained data in MATLAB.
So, the value of \(\left( {\begin{aligned}{{\beta _1}}\\{{\beta _2}}\end{aligned}} \right)\) is \(\left( {\begin{aligned}{1.76}\\{ - 0.20}\end{aligned}} \right)\).
Now, substitute the obtained values into \({\bf{y}} = {\beta _1}x + {\beta _2}{x^2}\).
\({\bf{y}} = 1.76x - 0.20{x^2}\)
So, the required equation is \({\bf{y}} = 1.76x - 0.20{x^2}\).
94% of StudySmarter users get better grades.
Sign up for free