Linear Regression - Estimating Parameters Bernd Schr oder logo1 - - PowerPoint PPT Presentation

linear regression estimating parameters
SMART_READER_LITE
LIVE PREVIEW

Linear Regression - Estimating Parameters Bernd Schr oder logo1 - - PowerPoint PPT Presentation

Coefficients Examples Error Sum of Squares Coefficient of Determination Linear Regression - Estimating Parameters Bernd Schr oder logo1 Bernd Schr oder Louisiana Tech University, College of Engineering and Science Linear Regression -


slide-1
SLIDE 1

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Linear Regression - Estimating Parameters

Bernd Schr¨

  • der

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-2
SLIDE 2

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

General Idea

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-3
SLIDE 3

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

General Idea

  • 1. If we think there is a linear relation y = β0 +β1x between

two variables

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-4
SLIDE 4

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

General Idea

  • 1. If we think there is a linear relation y = β0 +β1x between

two variables, how do we get the coefficients β0 and β1?

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-5
SLIDE 5

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

General Idea

  • 1. If we think there is a linear relation y = β0 +β1x between

two variables, how do we get the coefficients β0 and β1?

  • 2. The sum of the squared vertical deviations of the points

(x1,y1),...,(xn,yn) from y = b0 +b1x is f(b0,b1) =

n

i=1

[yi −(b0 +b1xi)]2 .

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-6
SLIDE 6

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

General Idea

  • 1. If we think there is a linear relation y = β0 +β1x between

two variables, how do we get the coefficients β0 and β1?

  • 2. The sum of the squared vertical deviations of the points

(x1,y1),...,(xn,yn) from y = b0 +b1x is f(b0,b1) =

n

i=1

[yi −(b0 +b1xi)]2 .

  • 3. The linear least squares estimates ˆ

β0 and ˆ β1 of β0 and β1, respectively, are the values that minimize f(b0,b1).

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-7
SLIDE 7

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

General Idea

  • 1. If we think there is a linear relation y = β0 +β1x between

two variables, how do we get the coefficients β0 and β1?

  • 2. The sum of the squared vertical deviations of the points

(x1,y1),...,(xn,yn) from y = b0 +b1x is f(b0,b1) =

n

i=1

[yi −(b0 +b1xi)]2 .

  • 3. The linear least squares estimates ˆ

β0 and ˆ β1 of β0 and β1, respectively, are the values that minimize f(b0,b1). The estimated regression line or least squares line is the line with y = ˆ β0 + ˆ β1x.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-8
SLIDE 8

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

General Idea

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-9
SLIDE 9

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

General Idea

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-10
SLIDE 10

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

General Idea

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-11
SLIDE 11

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

General Idea

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-12
SLIDE 12

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-13
SLIDE 13

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

∂f ∂b0

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-14
SLIDE 14

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

∂f ∂b0 = ∂ ∂b0

n

i=1

[yi −(b0 +b1xi)]2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-15
SLIDE 15

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

∂f ∂b0 = ∂ ∂b0

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

[yi −(b0 +b1xi)]

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-16
SLIDE 16

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

∂f ∂b0 = ∂ ∂b0

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

[yi −(b0 +b1xi)] ! = 0

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-17
SLIDE 17

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

∂f ∂b0 = ∂ ∂b0

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

[yi −(b0 +b1xi)] ! = 0 ∂f ∂b1

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-18
SLIDE 18

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

∂f ∂b0 = ∂ ∂b0

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

[yi −(b0 +b1xi)] ! = 0 ∂f ∂b1 = ∂ ∂b1

n

i=1

[yi −(b0 +b1xi)]2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-19
SLIDE 19

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

∂f ∂b0 = ∂ ∂b0

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

[yi −(b0 +b1xi)] ! = 0 ∂f ∂b1 = ∂ ∂b1

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

xi [yi −(b0 +b1xi)]

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-20
SLIDE 20

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

∂f ∂b0 = ∂ ∂b0

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

[yi −(b0 +b1xi)] ! = 0 ∂f ∂b1 = ∂ ∂b1

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

xi [yi −(b0 +b1xi)] ! = 0

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-21
SLIDE 21

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

∂f ∂b0 = ∂ ∂b0

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

[yi −(b0 +b1xi)] ! = 0 ∂f ∂b1 = ∂ ∂b1

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

xi [yi −(b0 +b1xi)] ! = 0

n

i=1

yi −nb0 −b1

n

i=1

xi =

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-22
SLIDE 22

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

∂f ∂b0 = ∂ ∂b0

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

[yi −(b0 +b1xi)] ! = 0 ∂f ∂b1 = ∂ ∂b1

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

xi [yi −(b0 +b1xi)] ! = 0

n

i=1

yi −nb0 −b1

n

i=1

xi =

n

i=1

xiyi −b0

n

i=1

xi −b1

n

i=1

x2

i

=

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-23
SLIDE 23

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

∂f ∂b0 = ∂ ∂b0

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

[yi −(b0 +b1xi)] ! = 0 ∂f ∂b1 = ∂ ∂b1

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

xi [yi −(b0 +b1xi)] ! = 0

n

i=1

yi −nb0 −b1

n

i=1

xi =

n

i=1

xiyi −b0

n

i=1

xi −b1

n

i=1

x2

i

= nb0 +b1

n

i=1

xi =

n

i=1

yi

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-24
SLIDE 24

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

∂f ∂b0 = ∂ ∂b0

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

[yi −(b0 +b1xi)] ! = 0 ∂f ∂b1 = ∂ ∂b1

n

i=1

[yi −(b0 +b1xi)]2 = −2

n

i=1

xi [yi −(b0 +b1xi)] ! = 0

n

i=1

yi −nb0 −b1

n

i=1

xi =

n

i=1

xiyi −b0

n

i=1

xi −b1

n

i=1

x2

i

= nb0 +b1

n

i=1

xi =

n

i=1

yi b0

n

i=1

xi +b1

n

i=1

x2

i

=

n

i=1

xiyi

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-25
SLIDE 25

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-26
SLIDE 26

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

nb0 +b1

n

i=1

xi =

n

i=1

yi b0

n

i=1

xi +b1

n

i=1

x2

i

=

n

i=1

xiyi

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-27
SLIDE 27

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

nb0 +b1

n

i=1

xi =

n

i=1

yi b0

n

i=1

xi +b1

n

i=1

x2

i

=

n

i=1

xiyi b0 = 1 n

  • n

i=1

yi −b1

n

i=1

xi

  • Bernd Schr¨
  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-28
SLIDE 28

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

nb0 +b1

n

i=1

xi =

n

i=1

yi b0

n

i=1

xi +b1

n

i=1

x2

i

=

n

i=1

xiyi b0 = 1 n

  • n

i=1

yi −b1

n

i=1

xi

  • 1

n

  • n

i=1

yi −b1

n

i=1

xi

  • n

i=1

xi +b1

n

i=1

x2

i

=

n

i=1

xiyi

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-29
SLIDE 29

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

nb0 +b1

n

i=1

xi =

n

i=1

yi b0

n

i=1

xi +b1

n

i=1

x2

i

=

n

i=1

xiyi b0 = 1 n

  • n

i=1

yi −b1

n

i=1

xi

  • 1

n

  • n

i=1

yi −b1

n

i=1

xi

  • n

i=1

xi +b1

n

i=1

x2

i

=

n

i=1

xiyi b1  

n

i=1

x2

i − 1

n

  • n

i=1

xi 2  =

n

i=1

xiyi − 1 n

n

i=1

yi

n

i=1

xi

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-30
SLIDE 30

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-31
SLIDE 31

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

b1 = ∑n

i=1 xiyi − 1 n ∑n i=1 yi ∑n i=1 xi

  • ∑n

i=1 x2 i − 1 n (∑n i=1 xi)2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-32
SLIDE 32

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

b1 = ∑n

i=1 xiyi − 1 n ∑n i=1 yi ∑n i=1 xi

  • ∑n

i=1 x2 i − 1 n (∑n i=1 xi)2

= ∑n

i=1 xiyi −∑n i=1 yix

  • ∑n

i=1 x2 i −∑n i=1 xix

  • Bernd Schr¨
  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-33
SLIDE 33

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

b1 = ∑n

i=1 xiyi − 1 n ∑n i=1 yi ∑n i=1 xi

  • ∑n

i=1 x2 i − 1 n (∑n i=1 xi)2

= ∑n

i=1 xiyi −∑n i=1 yix

  • ∑n

i=1 x2 i −∑n i=1 xix

  • =

∑n

i=1 yi (xi −x)−∑n i=1 y(xi −x)

∑n

i=1 xi (xi −x)−∑n i=1 x(xi −x)

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-34
SLIDE 34

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

b1 = ∑n

i=1 xiyi − 1 n ∑n i=1 yi ∑n i=1 xi

  • ∑n

i=1 x2 i − 1 n (∑n i=1 xi)2

= ∑n

i=1 xiyi −∑n i=1 yix

  • ∑n

i=1 x2 i −∑n i=1 xix

  • =

∑n

i=1 yi (xi −x)−∑n i=1 y(xi −x)

∑n

i=1 xi (xi −x)−∑n i=1 x(xi −x)

= ∑n

i=1 (xi −x)(yi −y)

∑n

i=1 (xi −x)2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-35
SLIDE 35

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

b1 = ∑n

i=1 xiyi − 1 n ∑n i=1 yi ∑n i=1 xi

  • ∑n

i=1 x2 i − 1 n (∑n i=1 xi)2

= ∑n

i=1 xiyi −∑n i=1 yix

  • ∑n

i=1 x2 i −∑n i=1 xix

  • =

∑n

i=1 yi (xi −x)−∑n i=1 y(xi −x)

∑n

i=1 xi (xi −x)−∑n i=1 x(xi −x)

= ∑n

i=1 (xi −x)(yi −y)

∑n

i=1 (xi −x)2

b0 = y−b1x

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-36
SLIDE 36

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Summarizing the Formulas

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-37
SLIDE 37

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Summarizing the Formulas

1. b1

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-38
SLIDE 38

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Summarizing the Formulas

1. b1 = ∑n

i=1 xiyi − 1 n ∑n i=1 yi ∑n i=1 xi

  • ∑n

i=1 x2 i − 1 n (∑n i=1 xi)2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-39
SLIDE 39

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Summarizing the Formulas

1. b1 = ∑n

i=1 xiyi − 1 n ∑n i=1 yi ∑n i=1 xi

  • ∑n

i=1 x2 i − 1 n (∑n i=1 xi)2

= ∑n

i=1 (xi −x)(yi −y)

∑n

i=1 (xi −x)2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-40
SLIDE 40

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Summarizing the Formulas

1. b1 = ∑n

i=1 xiyi − 1 n ∑n i=1 yi ∑n i=1 xi

  • ∑n

i=1 x2 i − 1 n (∑n i=1 xi)2

= ∑n

i=1 (xi −x)(yi −y)

∑n

i=1 (xi −x)2

= Sxy Sxx

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-41
SLIDE 41

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Summarizing the Formulas

1. b1 = ∑n

i=1 xiyi − 1 n ∑n i=1 yi ∑n i=1 xi

  • ∑n

i=1 x2 i − 1 n (∑n i=1 xi)2

= ∑n

i=1 (xi −x)(yi −y)

∑n

i=1 (xi −x)2

= Sxy Sxx

  • 2. b0 = y−b1x

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-42
SLIDE 42

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Summarizing the Formulas

1. b1 = ∑n

i=1 xiyi − 1 n ∑n i=1 yi ∑n i=1 xi

  • ∑n

i=1 x2 i − 1 n (∑n i=1 xi)2

= ∑n

i=1 (xi −x)(yi −y)

∑n

i=1 (xi −x)2

= Sxy Sxx

  • 2. b0 = y−b1x
  • 3. Fitted (or predicted) values: ˆ

yi := ˆ β0 + ˆ β1xi.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-43
SLIDE 43

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Summarizing the Formulas

1. b1 = ∑n

i=1 xiyi − 1 n ∑n i=1 yi ∑n i=1 xi

  • ∑n

i=1 x2 i − 1 n (∑n i=1 xi)2

= ∑n

i=1 (xi −x)(yi −y)

∑n

i=1 (xi −x)2

= Sxy Sxx

  • 2. b0 = y−b1x
  • 3. Fitted (or predicted) values: ˆ

yi := ˆ β0 + ˆ β1xi.

  • 4. Residuals: yi − ˆ

yi.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-44
SLIDE 44

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 1

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-45
SLIDE 45

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 1

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-46
SLIDE 46

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 1

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-47
SLIDE 47

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 1

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-48
SLIDE 48

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 1

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-49
SLIDE 49

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 1

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-50
SLIDE 50

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 1

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-51
SLIDE 51

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-52
SLIDE 52

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-53
SLIDE 53

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-54
SLIDE 54

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-55
SLIDE 55

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-56
SLIDE 56

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-57
SLIDE 57

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-58
SLIDE 58

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

How Well Does the Line Fit the Data?

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-59
SLIDE 59

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

How Well Does the Line Fit the Data?

  • 1. Error sum of squares (or residual sum of squares).

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-60
SLIDE 60

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

How Well Does the Line Fit the Data?

  • 1. Error sum of squares (or residual sum of squares).

SSE =

n

i=1

(yi − ˆ yi)2 =

n

i=1

  • yi −
  • ˆ

β0 + ˆ β1xi 2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-61
SLIDE 61

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

How Well Does the Line Fit the Data?

  • 1. Error sum of squares (or residual sum of squares).

SSE =

n

i=1

(yi − ˆ yi)2 =

n

i=1

  • yi −
  • ˆ

β0 + ˆ β1xi 2 Estimate of σ2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-62
SLIDE 62

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

How Well Does the Line Fit the Data?

  • 1. Error sum of squares (or residual sum of squares).

SSE =

n

i=1

(yi − ˆ yi)2 =

n

i=1

  • yi −
  • ˆ

β0 + ˆ β1xi 2 Estimate of σ2: ˆ σ2 = s2 = SSE n−2 = ∑n

i=1 (yi − ˆ

yi)2 n−2 .

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-63
SLIDE 63

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

How Well Does the Line Fit the Data?

  • 1. Error sum of squares (or residual sum of squares).

SSE =

n

i=1

(yi − ˆ yi)2 =

n

i=1

  • yi −
  • ˆ

β0 + ˆ β1xi 2 Estimate of σ2: ˆ σ2 = s2 = SSE n−2 = ∑n

i=1 (yi − ˆ

yi)2 n−2 .

  • 2. We divide by n−2 because we have only n−2 degrees of

freedom after determining two parameters ˆ β0 and ˆ β1.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-64
SLIDE 64

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

How Well Does the Line Fit the Data?

  • 1. Error sum of squares (or residual sum of squares).

SSE =

n

i=1

(yi − ˆ yi)2 =

n

i=1

  • yi −
  • ˆ

β0 + ˆ β1xi 2 Estimate of σ2: ˆ σ2 = s2 = SSE n−2 = ∑n

i=1 (yi − ˆ

yi)2 n−2 .

  • 2. We divide by n−2 because we have only n−2 degrees of

freedom after determining two parameters ˆ β0 and ˆ β1. (Previously, using an estimate of µ resulted in the loss of

  • ne degree of freedom.)

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-65
SLIDE 65

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

How Well Does the Line Fit the Data?

  • 1. Error sum of squares (or residual sum of squares).

SSE =

n

i=1

(yi − ˆ yi)2 =

n

i=1

  • yi −
  • ˆ

β0 + ˆ β1xi 2 Estimate of σ2: ˆ σ2 = s2 = SSE n−2 = ∑n

i=1 (yi − ˆ

yi)2 n−2 .

  • 2. We divide by n−2 because we have only n−2 degrees of

freedom after determining two parameters ˆ β0 and ˆ β1. (Previously, using an estimate of µ resulted in the loss of

  • ne degree of freedom.)
  • 3. It can be shown (we cannot present the proof) that S2 is an

unbiased estimator for σ2.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-66
SLIDE 66

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Formula For SSE

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-67
SLIDE 67

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Formula For SSE

SSE

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-68
SLIDE 68

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Formula For SSE

SSE =

n

i=1

(yi − ˆ yi)2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-69
SLIDE 69

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Formula For SSE

SSE =

n

i=1

(yi − ˆ yi)2 =

n

i=1

  • yi −
  • ˆ

β0 + ˆ β1xi 2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-70
SLIDE 70

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Formula For SSE

SSE =

n

i=1

(yi − ˆ yi)2 =

n

i=1

  • yi −
  • ˆ

β0 + ˆ β1xi 2 =

n

i=1

y2

i −2 ˆ

β0yi −2 ˆ β1xiyi + ˆ β 2

0 +2 ˆ

β0 ˆ β1xi + ˆ β 2

1 x2 i

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-71
SLIDE 71

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Formula For SSE

SSE =

n

i=1

(yi − ˆ yi)2 =

n

i=1

  • yi −
  • ˆ

β0 + ˆ β1xi 2 =

n

i=1

y2

i −2 ˆ

β0yi −2 ˆ β1xiyi + ˆ β 2

0 +2 ˆ

β0 ˆ β1xi + ˆ β 2

1 x2 i

=

n

i=1

y2

i −2 ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi +n ˆ β 2

0 +2 ˆ

β0 ˆ β1

n

i=1

xi + ˆ β 2

1 n

i=1

x2

i

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-72
SLIDE 72

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Formula For SSE

SSE =

n

i=1

y2

i −2 ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi +n ˆ β 2

0 +2 ˆ

β0 ˆ β1

n

i=1

xi + ˆ β 2

1 n

i=1

x2

i

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-73
SLIDE 73

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Formula For SSE

SSE =

n

i=1

y2

i −2 ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi +n ˆ β 2

0 +2 ˆ

β0 ˆ β1

n

i=1

xi + ˆ β 2

1 n

i=1

x2

i

=

n

i=1

y2

i −2 ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0

  • n

i=1

yi − ˆ β1

n

i=1

xi

  • Bernd Schr¨
  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-74
SLIDE 74

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Formula For SSE

SSE =

n

i=1

y2

i −2 ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi +n ˆ β 2

0 +2 ˆ

β0 ˆ β1

n

i=1

xi + ˆ β 2

1 n

i=1

x2

i

=

n

i=1

y2

i −2 ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0

  • n

i=1

yi − ˆ β1

n

i=1

xi

  • +2 ˆ

β0 ˆ β1

n

i=1

xi + ˆ β 2

1 n

i=1

x2

i

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-75
SLIDE 75

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Formula For SSE

SSE =

n

i=1

y2

i −2 ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi +n ˆ β 2

0 +2 ˆ

β0 ˆ β1

n

i=1

xi + ˆ β 2

1 n

i=1

x2

i

=

n

i=1

y2

i −2 ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0

  • n

i=1

yi − ˆ β1

n

i=1

xi

  • +2 ˆ

β0 ˆ β1

n

i=1

xi + ˆ β 2

1 n

i=1

x2

i

=

n

i=1

y2

i − ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0 ˆ β1

n

i=1

xi + ˆ β 2

1 n

i=1

x2

i

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-76
SLIDE 76

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

SSE =

n

i=1

y2

i − ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0 ˆ β1

n

i=1

xi + ˆ β 2

1 n

i=1

x2

i

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-77
SLIDE 77

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

SSE =

n

i=1

y2

i − ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0 ˆ β1

n

i=1

xi + ˆ β 2

1 n

i=1

x2

i

=

n

i=1

y2

i − ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0 ˆ β1

n

i=1

xi + ˆ β 2

1

 

n

i=1

x2

i ± 1

n

  • n

i=1

xi 2 

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-78
SLIDE 78

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

SSE =

n

i=1

y2

i − ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0 ˆ β1

n

i=1

xi + ˆ β 2

1 n

i=1

x2

i

=

n

i=1

y2

i − ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0 ˆ β1

n

i=1

xi + ˆ β 2

1

 

n

i=1

x2

i ± 1

n

  • n

i=1

xi 2  =

n

i=1

y2

i − ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0 ˆ β1

n

i=1

xi + ˆ β 2

1

 

n

i=1

x2

i − 1

n

  • n

i=1

xi 2 + ˆ β 2

1

1 n

  • n

i=1

xi 2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-79
SLIDE 79

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

SSE =

n

i=1

y2

i − ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0 ˆ β1

n

i=1

xi + ˆ β 2

1

 

n

i=1

x2

i − 1

n

  • n

i=1

xi 2 + ˆ β 2

1

1 n

  • n

i=1

xi 2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-80
SLIDE 80

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

SSE =

n

i=1

y2

i − ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0 ˆ β1

n

i=1

xi + ˆ β 2

1

 

n

i=1

x2

i − 1

n

  • n

i=1

xi 2 + ˆ β 2

1

1 n

  • n

i=1

xi 2 =

n

i=1

y2

i − ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0 ˆ β1

n

i=1

xi + ˆ β1

  • n

i=1

xiyi − 1 n

n

i=1

yi

n

i=1

xi

  • + ˆ

β 2

1

1 n

  • n

i=1

xi 2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-81
SLIDE 81

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

SSE =

n

i=1

y2

i − ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0 ˆ β1

n

i=1

xi + ˆ β1

  • n

i=1

xiyi − 1 n

n

i=1

yi

n

i=1

xi

  • + ˆ

β 2

1

1 n

  • n

i=1

xi 2

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-82
SLIDE 82

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

SSE =

n

i=1

y2

i − ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0 ˆ β1

n

i=1

xi + ˆ β1

  • n

i=1

xiyi − 1 n

n

i=1

yi

n

i=1

xi

  • + ˆ

β 2

1

1 n

  • n

i=1

xi 2 =

n

i=1

y2

i − ˆ

β0

n

i=1

yi − ˆ β1

n

i=1

xiyi + ˆ β0 ˆ β1

n

i=1

xi − ˆ β1

n

i=1

xi

  • 1

n

n

i=1

yi − ˆ β1 1 n

n

i=1

xi

  • Bernd Schr¨
  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-83
SLIDE 83

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

SSE =

n

i=1

y2

i − ˆ

β0

n

i=1

yi −2 ˆ β1

n

i=1

xiyi + ˆ β0 ˆ β1

n

i=1

xi + ˆ β1

  • n

i=1

xiyi − 1 n

n

i=1

yi

n

i=1

xi

  • + ˆ

β 2

1

1 n

  • n

i=1

xi 2 =

n

i=1

y2

i − ˆ

β0

n

i=1

yi − ˆ β1

n

i=1

xiyi + ˆ β0 ˆ β1

n

i=1

xi − ˆ β1

n

i=1

xi

  • 1

n

n

i=1

yi − ˆ β1 1 n

n

i=1

xi

  • =

n

i=1

y2

i − ˆ

β0

n

i=1

yi − ˆ β1

n

i=1

xiyi

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-84
SLIDE 84

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 1.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-85
SLIDE 85

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 1.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-86
SLIDE 86

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 1. SSE ≈ 1.1194 and s2 ≈ 0.0622

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-87
SLIDE 87

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 2.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-88
SLIDE 88

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 2.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-89
SLIDE 89

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 2. SSE ≈ 79.7958 and s2 ≈ 4.4331

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-90
SLIDE 90

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Coefficient of Determination

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-91
SLIDE 91

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Coefficient of Determination

  • 1. Let SST :=

n

i=1

(yi −y)2 be the total sum of squares.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-92
SLIDE 92

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Coefficient of Determination

  • 1. Let SST :=

n

i=1

(yi −y)2 be the total sum of squares. The coefficient of determination is given by r2 = 1− SSE SST .

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-93
SLIDE 93

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Coefficient of Determination

  • 1. Let SST :=

n

i=1

(yi −y)2 be the total sum of squares. The coefficient of determination is given by r2 = 1− SSE SST .

  • 2. SSE measures how much variation is not attributed to the

linear relationship.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-94
SLIDE 94

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Coefficient of Determination

  • 1. Let SST :=

n

i=1

(yi −y)2 be the total sum of squares. The coefficient of determination is given by r2 = 1− SSE SST .

  • 2. SSE measures how much variation is not attributed to the

linear relationship.

  • 3. SST measures the total variation in y.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-95
SLIDE 95

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Coefficient of Determination

  • 1. Let SST :=

n

i=1

(yi −y)2 be the total sum of squares. The coefficient of determination is given by r2 = 1− SSE SST .

  • 2. SSE measures how much variation is not attributed to the

linear relationship.

  • 3. SST measures the total variation in y.
  • 4. The quotient gives the proportion of the variation not

attributed to the linear relationship.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-96
SLIDE 96

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Coefficient of Determination

  • 1. Let SST :=

n

i=1

(yi −y)2 be the total sum of squares. The coefficient of determination is given by r2 = 1− SSE SST .

  • 2. SSE measures how much variation is not attributed to the

linear relationship.

  • 3. SST measures the total variation in y.
  • 4. The quotient gives the proportion of the variation not

attributed to the linear relationship.

  • 5. r2 gives the proportion of the variation that is attributed to

the linear relationship.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-97
SLIDE 97

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 1.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-98
SLIDE 98

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 1.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-99
SLIDE 99

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 1. r2 ≈ .9516

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-100
SLIDE 100

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 2.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-101
SLIDE 101

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 2.

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters

slide-102
SLIDE 102

logo1 Coefficients Examples Error Sum of Squares Coefficient of Determination

Example 2. r2 ≈ 0.8403

Bernd Schr¨

  • der

Louisiana Tech University, College of Engineering and Science Linear Regression - Estimating Parameters