24
Chapter 12 Simple Linear Regression Simple Linear Regression Model Least Squares Method Coefficient of Determination Model Assumptions Testing for Significance

Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Chapter 12Simple Linear Regression

� Simple Linear Regression Model� Least Squares Method� Coefficient of Determination� Model Assumptions� Testing for Significance

Page 2: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Simple Linear Regression Model

y = β0 + β1x +ε

where:β0 and β1 are called parameters of the model,ε is a random variable called the error term.

The simple linear regression model is:

The equation that describes how y is related to x andan error term is called the regression model.

Page 3: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Simple Linear Regression Equation

� The simple linear regression equation is:

• E(y) is the expected value of y for a given x value.• β1 is the slope of the regression line.• β0 is the y intercept of the regression line.• Graph of the regression equation is a straight line.

E(y) = β0 + β1x

Page 4: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Simple Linear Regression Equation

� Positive Linear Relationship

E(y)E(y)

xx

Slope β1is positive

Regression line

Interceptβ0

Page 5: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Simple Linear Regression Equation

� Negative Linear Relationship

E(y)E(y)

xx

Slope β1is negative

Regression lineInterceptβ0

Page 6: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Simple Linear Regression Equation

� No Relationship

E(y)E(y)

xx

Slope β1is 0

Regression lineIntercept

β0

Page 7: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Estimated Simple Linear Regression Equation

� The estimated simple linear regression equation

0 1y b b x= +0 1y b b x= +

• is the estimated value of y for a given x value.yy• b1 is the slope of the line.• b0 is the y intercept of the line.• The graph is called the estimated regression line.

Page 8: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Estimation Process

Regression Modely = β0 + β1x +ε

Regression EquationE(y) = β0 + β1x

Unknown Parametersβ0, β1

Sample Data:x yx1 y1. .. .

xn yn

b0 and b1provide estimates of

β0 and β1

EstimatedRegression Equation

Sample Statisticsb0, b1

0 1y b b x= +0 1y b b x= +

Page 9: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Least Squares Method

� Least Squares Criterion

min (y yi i−∑ $ )2min (y yi i−∑ $ )2

where:yi = observed value of the dependent variable

for the ith observationyi = estimated value of the dependent variable

for the ith observation

Page 10: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Least Squares Method

� Slope for the Estimated Regression Equation

( )

( )∑ ∑

∑ ∑ ∑

−=

nx

x

nyx

yxb

ii

iiii

22

1

Page 11: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

� y-Intercept for the Estimated Regression Equation

Least Squares Method

0 1b y b x= −0 1b y b x= −

where:xi = value of independent variable for ith

observation

n = total number of observations

_y = mean value for dependent variable

_x = mean value for independent variable

yi = value of dependent variable for ithobservation

Page 12: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Reed Auto periodically hasa special week-long sale. As part of the advertisingcampaign Reed runs one ormore television commercialsduring the weekend preceding the sale. Data from asample of 5 previous sales are shown on the next slide.

Simple Linear Regression

� Example: Reed Auto Sales

Page 13: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Simple Linear Regression

� Example: Reed Auto Sales

Number ofTV Ads

Number ofCars Sold

13213

1424181727

Page 14: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Estimated Regression Equation

ˆ 10 5y x= +ˆ 10 5y x= +

1 2

( )( ) 20 5( ) 4

i i

i

x x y yb

x x− −

= = =−

∑∑1 2

( )( ) 20 5( ) 4

i i

i

x x y yb

x x− −

= = =−

∑∑

0 1 20 5(2) 10b y b x= − = − =0 1 20 5(2) 10b y b x= − = − =

� Slope for the Estimated Regression Equation

� y-Intercept for the Estimated Regression Equation

� Estimated Regression Equation

Page 15: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Scatter Diagram and Trend Line

y = 5x + 10

0

5

10

15

20

25

30

0 1 2 3 4TV Ads

Car

s So

ld

Page 16: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Coefficient of Determination

� Relationship Among SST, SSR, SSE

where:SST = total sum of squaresSSR = sum of squares due to regressionSSE = sum of squares due to error

SST = SSR + SSE

2( )iy y−∑ 2( )iy y−∑ 2ˆ( )iy y= −∑ 2ˆ( )iy y= −∑ 2ˆ( )i iy y+ −∑ 2ˆ( )i iy y+ −∑

Page 17: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

� The coefficient of determination is:

Coefficient of Determination

where:SSR = sum of squares due to regressionSST = total sum of squares

r2 = SSR/SST

Page 18: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Coefficient of Determination

r2 = SSR/SST = 100/114 = .8772

The regression relationship is very strong; 88%of the variability in the number of cars sold can beexplained by the linear relationship between thenumber of TV ads and the number of cars sold.

Page 19: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Sample Correlation Coefficient

21 ) of(sign rbrxy = 21 ) of(sign rbrxy =

ionDeterminat oft Coefficien ) of(sign 1brxy = ionDeterminat oft Coefficien ) of(sign 1brxy =

where:b1 = the slope of the estimated regression

equation xbby 10ˆ += xbby 10ˆ +=

Page 20: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

21 ) of(sign rbrxy = 21 ) of(sign rbrxy =

The sign of b1 in the equation is “+”.ˆ 10 5y x= +ˆ 10 5y x= +

= + .8772xyr = + .8772xyr

Sample Correlation Coefficient

rxy = +.9366

Page 21: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Assumptions About the Error Term ε

1. The error ε is a random variable with mean of zero.

2. The variance of ε , denoted by σ 2, is the same forall values of the independent variable.

3. The values of ε are independent.

4. The error ε is a normally distributed randomvariable.

Page 22: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Testing for Significance

To test for a significant regression relationship, wemust conduct a hypothesis test to determine whetherthe value of β1 is zero.

Two tests are commonly used:

t Test and F Test

Both the t test and F test require an estimate of σ 2,the variance of ε in the regression model.

Page 23: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

� An Estimate of σ

Testing for Significance

∑∑ −−=−= 210

2 )()ˆ(SSE iiii xbbyyy ∑∑ −−=−= 210

2 )()ˆ(SSE iiii xbbyyy

where:

s 2 = MSE = SSE/(n − 2)

The mean square error (MSE) provides the estimateof σ 2, and the notation s2 is also used.

Page 24: Chapter 12 Simple Linear Regressionfaculty.tamucc.edu/rcutshall/Chapter_12.pdf · Chapter 12 Simple Linear Regression ... Sample Correlation Coefficient 2 xy =(sign of b 1)r r xy

Testing for Significance

� An Estimate of σ

2SSEMSE

−==

ns

2SSEMSE

−==

ns

• To estimate σ we take the square root of σ 2.• The resulting s is called the standard error of

the estimate.