Quiz 08: Finding the Least-Squares Line for Given Points in a 2D Space, Exercises of Linear Algebra

A math quiz focusing on finding the least-squares line that best fits a set of given points in a 2d space. Students are required to find the design matrix x and observation vector y, calculate the normal equation, and determine the residuals. They will also compare the results with an alternative line.

Typology: Exercises

2012/2013

Uploaded on 02/27/2013

sethuraman_h34rt
sethuraman_h34rt 🇮🇳

4.3

(8)

153 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 SJJldti .s)v(,01\ 8am 1:10 pm
1. Consider the points PI =(1, -16), P2 -: (3,10), P.3= (7,8), and P4 = (9,10), measUIements made in-
a lab where the data was supposed lie on a single line. Obviously something went wrong; these fOUIpoints
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 Xf3 =y to find f3 =[~~] such that the four points abo~e are on the line y- !30+ !3IX?
I I
i[
-/(,
]
X = I\3 y =/0
-118
- - .Ia_I'
I - - /0
,
lb. Since Xf3 = y has no solution, we'll have to be content with the least-squares solution. Find it; ie,
find fJoand /31for which y=/30+/31xis the least-quares line that best fits the fOUIgiven points- Show all
yourwork! T , '
Wnell; fo Bblo/e XX" r=X 3
r~20 JI
~<? ][IZ ]
L20 1,"/0 ~\ = -/60
Y1fJW, [..., to -
!
I'l. ][I0
/- ~.)7
Z() -1'1 I? l{Po -rJ 0 I - 2. ')J
9Vo -==-1/~
{>
~,,':: 2, S
1c. Find the fOUI ycoordinates corresponding to x= 1,3, 7,9 on the
into a vector we'll call p; p is OUIvector of predicted values.
U ~1l-;.;J~rn
~
est-fit line, and assemble them
p= -t
-z..
g
/3
1d. Findthe fOUIresiduals, and then the sum of their squares (80S).
-
[
-"I
]
g/+/'il{-to-r'l
Four Residuals: 3- f" .~? 808: =@i)
Ie. You might think that the line y=-77/4 + 13/4 xwould be a better fit: At least it goes through
PI and P.. Find the fourresiduals for fhis line,~d ~~:tb
J
e SUffi
[
-~:
]
the
l
i~ ;:u
]
ares
[
s. 0
]
jgO. 'Z~ l' 2~. 2 $"
FOUI ResIduals: y-- 1.S- ': IQ -. -1.5' :: !'J.: SOS: -
. 3.5 <;: 3.) 'f.S -::::: '-/00. S
If. Which line is a better fit? Explain. [/b N /0 000~ 0
-:;r;IIT !/lJe, y~c~ ASD~ h' f/)lIvlkr, "/hi IM~J. ~~i/;t'lt:e... /11)('1) [=i ]
~[-:i]
,/ 11 j} . J.. (\ [-If,
J[-I"]13 /D
0>fh4ktr ~14. dt,{/~ 1~ -7.-{ fc> I~
It? /D

Partial preview of the text

Download Quiz 08: Finding the Least-Squares Line for Given Points in a 2D Space and more Exercises Linear Algebra in PDF only on Docsity!

Math 205B&C 04/03/09 Quiz 08 page 1 Name _SJJldti .s)v(,01_ 8am 1:10 pm

1. Consider the points PI = (1, -16), P2 -: (3,10), P.3 = (7,8), and P4 = (9,10), measUIements made in-

a lab where the data was supposed lie on a single line. Obviously something went wrong; these fOUIpoints 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 Xf3 = y to find f3 = [~~] such that the four points abo~e are on the lineI I y - !30+ !3IX?

i (^) [

]

X = I \ 3 y = /

  • 118
  • -. I a_I' I - - /

,

lb. Since Xf3 = y has no solution, we'll have to be content with the least-squares solution. Find it; ie, find fJoand /31for which y = /30 + /31 x is the least-quares line that best fits the fOUIgiven points- Show all yourwork! T , '

W nell; fo Bblo/e X X" r =X 3

r ~ 20

J I

~<?

] [^

I Z

]

L 20 1,"/0 ~\ = - /

Y1fJW, [

..., to - !

I'l. ] [

I 0

  • ~.) 7

Z () -1'1 I? l{Po - rJ 0 I - 2. ')J

9 Vo -== -1/~ {>

~,,':: 2, S

1c. Find the fOUI y coordinates corresponding to x = 1,3, 7,9 on the

into a vector we'll call p; p is OUIvector of predicted values.

U ~1l-;.;J~rn

est-fit line, and assemble them

p= -t -z.. g

1d. Findthe fOUIresiduals, and then the sum of their squares (80S).

[

  • "I

]

g/+/'il{-to-r'l

Four Residuals: 3- f" .~? 808: = @i)

Ie. You might think that the line y = -77/4 + 13/4 x would be a better fit: At least it goes through

PI and P.. Find the four residuals for fhis line,~d ~~:tb

J

e SUffi

[

  • ~:

]

the

l

i~ ;:u

]

ares

[

s. 0

]

j gO. 'Z~ l' 2~. 2 $"

FOUI ResIduals: y - - 1.S- ': IQ -. -1.5' :: !'J.: SOS: -

. 3.5 <;: 3.) 'f.S -::::: '-/00. S

If. Which line is a better fit? Explain. [ /b N /0 0 00~ 0

-:;r; I IT !/lJe, y~c~ A SD~ h' f/)lIvlkr, "/hi IM~J. ~ ~i/;t'lt:e... /11)('1) [ =i

]

~

[

-:i

,/ 11 j}. J.. (\ ]

[

-If,

J [

-I"

]

13 /D 0 >fh4ktr ~ 14. dt,{/~ 1~ -7.-{ fc> I~ It? /D