Linear least squares
[38/74%]Let represent a subspace of the linear space of all -dimensional column vectors. Take to be the subspace of defined by if and only if for some vectors in . Let represent the projection (with respect to the usual inner product) of an matrix on , and let represent any matrix whose columns span . Show that for any solution to the linear system
Let represent any matrix. If a matrix is a solution to the linear system (in ), then is a generalized inverse of and is symmetric. Show that, conversely, if a matrix is a generalized inverse of and if is symmetric, then (i.e., is a solution to ).
Let the physical quantities and be related by an unknown linear relationship . As a result of measurements, the following pairs of values were obtained with some error: , . According to the principle of least squares, the most probable values of the coefficients and are those for which
attains its smallest value. Find the most probable values for the coefficients and .
Let be an arbitrary system of linear equations. Prove that the system of equations is consistent.
Using the method of least squares, solve the overdetermined system of linear equations:
Let on . The object of this problem is to determine the coefficients of the cubic polynomial
that is as close to as possible in the sense that
is as small as possible.
In order to minimize , impose the condition that for each , and show this results in a system of linear equations whose augmented matrix is , where and are given by
Any matrix that has the same form as is called a Hilbert matrix of order .
Systems involving Hilbert matrices are badly ill-conditioned, and the ill-conditioning becomes worse as the size increases. Use exact arithmetic with Gaussian elimination to reduce to triangular form. Assuming that the case in which is typical, explain why a general system will be ill-conditioned. Notice that even complete pivoting is of no help.
Perform the following calculations using the matrices:
Find , and solve using exact arithmetic.
Find , and solve exactly.
Find , and solve with 3-digit arithmetic.
Find , , and the solution of with 3-digit arithmetic.
Hooke's law says that the displacement of an ideal spring is proportional to the force that is applied — i.e., for some constant . Consider a spring in which is unknown. Various masses are attached, and the resulting displacements shown below are observed. Using these observations, determine the least squares estimate for .
Figure 4.6.6
Show that the slope of the line that passes through the origin in and comes closest in the least squares sense to passing through the points is given by .
A small company has been in business for three years and has recorded annual profits (in thousands of dollars) as follows.
Assuming that there is a linear trend in the declining profits, predict the year and the month in which the company begins to lose money.
An economist hypothesizes that the change (in dollars) in the price of a loaf of bread is primarily a linear combination of the change in the price of a bushel of wheat and the change in the minimum wage. That is, if is the change in bread prices, is the change in wheat prices, and is the change in the minimum wage, then . Suppose that for three consecutive years the change in bread prices, wheat prices, and the minimum wage are as shown below.
Use the theory of least squares to estimate the change in the price of bread in Year 4 if wheat prices and the minimum wage each fall by $1.
Suppose that a researcher hypothesizes that the weight loss of a pint of ice cream during storage is primarily a linear function of time. That is,
where the weight loss in grams, the storage time in weeks, and is a random error function whose mean value is . Suppose that an experiment is conducted, and the following data is obtained.
Determine the least squares estimates for the parameters and .
Predict the mean weight loss for a pint of ice cream that is stored for 20 weeks.
After studying a certain type of cancer, a researcher hypothesizes that in the short run the number () of malignant cells in a particular tissue grows exponentially with time (). That is, . Determine least squares estimates for the parameters and from the researcher's observed data given below.
Using least squares techniques, fit the following data
with a line and then fit the data with a quadratic . Determine which of these two curves best fits the data by computing the sum of the squares of the errors in each case.
Consider the time () it takes for a runner to complete a marathon (26 miles and 385 yards). Many factors such as height, weight, age, previous training, etc.can influence an athlete's performance, but experience has shown that the following three factors are particularly important:
A linear model hypothesizes that the time (in minutes) is given by , where is a random function accounting for all other factors and whose mean value is assumed to be zero. On the basis of the five observations given below, estimate the expected marathon time for a 43-year-old runner of height 74 in., weight 180 lbs., who has run 450 miles during the previous eight weeks.
What is your personal predicted mean marathon time?
For and , prove that is a least squares solution for if and only if is part of a solution to the larger system
It is not uncommon to encounter least squares problems in which is extremely large but very sparse (mostly zero entries). For these situations, the system above will usually contain significantly fewer nonzero entries than the system of normal equations, thereby helping to overcome the memory requirements that plague these problems. Using this system also eliminates the undesirable need to explicitly form the product — recall from Example 4.5.1 that forming can cause loss of significant information.
In many least squares applications, the underlying data matrix does not have independent columns — i.e., — so the corresponding system of normal equations will fail to have a unique solution. This means that in an associated linear estimation problem of the form
there will be infinitely many least squares estimates for the parameters , and hence there will be infinitely many estimates for the mean value of at any given point — which is clearly undesirable. In order to remedy this problem, we restrict ourselves to making estimates only at those points that are in the row space of . If
is any least squares solution (i.e., ), prove that the estimate defined by
is unique in the sense that is independent of which least squares solution is used.
For matrix in Exercise 5.11.8, and for , find the solution of that has minimum euclidean norm.
Equation (5.12.17): when is consistent, is the solution of minimal euclidean norm.
Explain why is a least squares solution for if and only if .
Prove that if , where is a least squares solution for , then .
Let and .
Determine the rectangular QR factorization of .
Use the QR factors from part (a) to determine the least squares solution to .
Use Householder reduction to compute the least squares solution for , where and .
Prove that a pseudosolution can be found as the solution of a new inhomogeneous system of equations formed using the Gram matrix :
What is the geometric meaning of the constants found in this way?
Using the method of least squares, find the pseudosolution of the following inconsistent systems of linear equations:
Prove that the solution of the least-squares interpolation problem in the space exists and is unique, and that the coefficients , are found from the system of inhomogeneous linear equations
where is the Gram matrix of the system of functions in the Euclidean space .
Using the method of least squares, find the interpolation (best mean-square approximation) of the function given by the values :
by a linear polynomial (i.e., interpolate using the system of functions );
by a quadratic polynomial ;
by a polynomial of degree 3, .
Find the quadratic deviation in each of these cases.
Using the method of least squares, find, in the Euclidean space of continuously differentiable functions with the inner product
the interpolation (best mean-square approximation) of a continuously differentiable function using the system of functions .
Prove that the set of pseudosolutions of the system forms an affine subspace (linear manifold)
in ( is some pseudosolution).
Let be the affine subspace of pseudosolutions of the system , and let be some pseudosolution. Prove that the following statements are equivalent:
;
;
.
Prove that there exists a unique vector determined by conditions 1-3. It is called the normal pseudosolution.
Consider the system , where is the matrix of the operator . The spaces and are equipped with the standard scalar products. Let be the canonical basis of the nonnegative self-adjoint operator , and let be its positive (i.e. nonzero) eigenvalues, corresponding to the eigenvectors respectively. Prove that the general pseudosolution of the system has the form
moreover the normal pseudosolution
If we have an inconsistent system of linear inhomogeneous equations, then from the point of view of the theory of linear operators this is a situation in which the operator is not invertible, and the vector does not lie in its image Im A. With the help of the scalar product it is possible to define the so-called pseudoinverse operator , which will "in the best way replace" the nonexistent inverse operator .
Let the matrix of a system of equations define some linear map . The spaces and may be regarded as Euclidean, by equipping them with corresponding (e.g. standard) scalar products. Define the pseudoinverse operator as follows:
where is the operator constructed in the previous problem. Prove that:
if the operator A is invertible, then ;
the vector is the normal pseudosolution of the system .
Let be a linear map of Euclidean spaces given by the matrix . Define the map as follows: let , then define the value as the (unique) normal pseudosolution of the system . Prove that:
B is a linear operator;
B coincides with the pseudoinverse operator .
Prove that the matrix of the pseudoinverse operator (defined with respect to the standard scalar product) equals the normal pseudosolution of the matrix equation (considered as an inhomogeneous system of linear equations with unknowns).
Let be an matrix over . The Moore-Penrose pseudo inverse matrix is the unique matrix which satisfies
We also have that
is the shortest length least square solution to the problem .
Show that if exists, then .
Let
Find the Moore-Penrose matrix inverse of .
Show that the curve fitting problem
by a quadratic polynomial of the form leads to an overdetermined linear system.
Consider the overdetermined linear system . Find an such that
with the residual vector and denotes the Euclidean norm.
Consider the overdetermined linear system with
Solve this linear system in the least squares sense (see the previous problem) by the normal equations method.
An underdetermined linear system is either inconsistent or has infinitely many solutions. Consider the underdetermined linear system , where is an matrix with and
Assume that has infinitely many solutions. Let be the matrix
We define . Find
subject to the constraint . Assume that exists for all . Apply the Lagrange multiplier method.