Let (x1, y1), (x2, y2), ., (n, Un) be n points in R2. We want to &quot;fit&quot; a straight line y = ax + b to these points in such a way that the...
View the step-by-step solution to:

Question

Hi, I was wondering how to

approach this question? Thanks!

Let (x1, y1), (x2, y2), ..., (n, Un) be n points in R2. We want to &quot;fit&quot; a straight line y = ax + b to
these points in such a way that the following cost function ( : R2 -&gt; R is minimized
l(a, b) = _(yi - ari - b)2.
i=1
(In other words, we want to find the coefficients a, b E R so that the sum of the squares of the vertical
deviations from the given points to the line is as small as possible.) The resulting line is called the linear
regression line for the points (x1, y1), (x2, y2), . . ., (In, yn).
. Show that a and b are given by
b = y - ax, a =
nay - Zilliyi
n(x)2 - 2-1 29
where T =
n
Lizzi and y =
- Enyi. Justify all of your claims.

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
• -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents