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

Question

Screen Shot 2019-10-01 at 2.04.14 AM.pngHi, I was wondering how to

approach this question? Thanks!

Screen Shot 2019-10-01 at 2.04.14 AM.png

Let (x1, y1), (x2, y2), ..., (n, Un) be n points in R2. We want to "fit" a straight line y = ax + b to
these points in such a way that the following cost function ( : R2 -> 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.

Top Answer

Sign up to view the full answer

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
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question