Math 205B&C Quiz 08: Finding the Best-Fit Line for Given Points, Exercises of Linear Algebra

A quiz question from a math 205b&c course, where students are required to find the best-fit line for a set of given points using matrix equations and least-squares solutions. The document also asks students to compare the results with an alternative line.

Typology: Exercises

2012/2013

Uploaded on 02/27/2013

seshadri_44het
seshadri_44het 🇮🇳

4.6

(48)

183 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Math 205B&C 04/03/09 Quiz 08 page 1 Name 8am 1:10 pm
1. Consider the points P1=(1,16), P2=(3,10), P3=(7,8), and P4=(9,10), measurements made in
a lab where the data was supposed lie on a single line. Obviously something went wrong; these four points
can’t possibly be on the same line.
1a. Explicitly, what are the design matrix Xand observation vector yyou would use in a matrix
equation Xβ=yto find β=β0
β1such that the four points above are on the line y=β0+β1x?
X=y=
1b. Since Xβ=yhas no solution, we’ll have to be content with the least-squares solution. Find it; ie,
find β0and β1for which y=β0+β1xis the least-squares line that best fits the four given points. Show
all your work!
β0=β1=
1c. Find the four ycoordinates corresponding to x=1,3,7,9 on the best-fit line, and assemble them
into a vector we’ll call p;pis our vector of predicted values.
p=
1d. Find the four residuals, and then the sum of their squares (SOS).
Four Residuals: SOS:
1e. You might think that the line y=77/4+13/4xwould be a better fit: At least it goes through
P1and P4. Find the four residuals for this line, and then the sum of their squares.
Four Residuals: SOS:
1f. Which line is a better fit? Explain.

Partial preview of the text

Download Math 205B&C Quiz 08: Finding the Best-Fit Line for Given Points and more Exercises Linear Algebra in PDF only on Docsity!

Math 205B&C 04/03/09 Quiz 08 page 1 Name 8am 1:10 pm

  1. Consider the points P 1 = (1, −16), P 2 = (3, 10), P 3 = (7, 8), and P 4 = (9, 10), measurements made in a lab where the data was supposed lie on a single line. Obviously something went wrong; these four points can’t possibly be on the same line. 1a. Explicitly, what are the design matrix X and observation vector y you would use in a matrix

equation Xβ = y to find β =

[

β 0 β 1

]

such that the four points above are on the line y = β 0 + β 1 x?

X = y =

1b. Since Xβ = y has no solution, we’ll have to be content with the least-squares solution. Find it; ie, find β 0 and β 1 for which y = β 0 + β 1 x is the least-squares line that best fits the four given points. Show all your work!

β 0 = β 1 =

1c. Find the four y coordinates corresponding to x = 1, 3 , 7 , 9 on the best-fit line, and assemble them into a vector we’ll call p; p is our vector of predicted values. p =

1d. Find the four residuals, and then the sum of their squares (SOS).

Four Residuals: SOS:

1e. You might think that the line y = − 77 /4 + 13/ 4 x would be a better fit: At least it goes through P 1 and P 4. Find the four residuals for this line, and then the sum of their squares.

Four Residuals: SOS:

1f. Which line is a better fit? Explain.