{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lec29 - Lecture 29 Simple linear regression 29.1 Method of...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 29 Simple linear regression. 29.1 Method of least squares. Suppose that we are given a sequence of observations ( X 1 , Y 1 ) , . . . , ( X n , Y n ) where each observation is a pair of numbers X , Y i . Suppose that we want to predict variable Y as a function of X because we believe that there is some underlying relationship between Y and X and, for example, Y can be approximated by a function of X, i.e. Y f ( X ). We will consider the simplest case when f ( x ) is a linear function of x : f ( x ) = β 0 + β 1 x. x x x x x X Y Figure 29.1: The least-squares line. Of course, we want to find the line that fits our data best and one can define the measure of the quality of the fit in many different ways. The most common approach 116
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
LECTURE 29. SIMPLE LINEAR REGRESSION. 117 is to measure how Y i is approximated by β 0 + β 1 X i in terms of the squared difference ( Y i - ( β 0 + β 1 X i )) 2 which means that we measure the quality of approximation globally by the loss function L = n X i =1 ( Y i |{z} actual - ( β 0 + β 1 X i | {z } estimate )) 2 minimize over β 0 , β 1 and we want to minimize it over all choices of parameters β 0 , β 1 . The line that mini- mizes this loss is called the least-squares line . To find the critical points we write: ∂L ∂β 0 = - n X i =1 2( Y i - ( β 0 + β 1 X i )) = 0 ∂L ∂β 1 = - n X i =1 2( Y i - ( β 0 + β 1 X i )) X i
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern