Least Squares Regression Lines

18
Least Squares Regression Lines Text: Chapter 3.3 Unit 4: Notes page 58

description

Least Squares Regression Lines. Text: Chapter 3.3 Unit 4: Notes page 58. x – variable: is the independent or explanatory variable y - variable: is the dependent or response variable Use x to predict y. Bivariate data. b – is the slope - PowerPoint PPT Presentation

Transcript of Least Squares Regression Lines

Page 1: Least Squares Regression Lines

Least Squares Regression Lines

Text: Chapter 3.3

Unit 4: Notes page 58

Page 2: Least Squares Regression Lines

Bivariate data

• x – variable: is the independent or explanatory variable

• y- variable: is the dependent or response variable

• Use x to predict y

Page 3: Least Squares Regression Lines

bxay ˆ

b – is the slope– it is the approximate amount by which y

increases when x increases by 1 unita – is the y-intercept

– it is the approximate height of the line when x = 0

– in some situations, the y-intercept has no meaning

y - (y-hat) means the predicted y

Be sure to put the hat on the y

Page 4: Least Squares Regression Lines

Least Squares Regression LineLSRL

• The line that gives the bestbest fit to the data set

• The line that minimizesminimizes the sum of the squares of the deviations from the line

Page 5: Least Squares Regression Lines

Sum of the squares = 61.25

(-4)2 + (4.5)2 + (-5)2 = 61.25

45 xy .ˆ

-4

4.5

-5

y =.5(0) + 4 = 4

0 – 4 = -4

(0,0)

(3,10)

(6,2)

(0,0)

y =.5(3) + 4 = 5.5

10 – 5.5 = 4.5

y =.5(6) + 4 = 7

2 – 7 = -5

Page 6: Least Squares Regression Lines

(0,0)

(3,10)

(6,2)

Sum of the squares = 54

33

1 xy

Use a calculator to find the line of best fitSTAT EDIT L1, L2

STAT CALC 4 LinReg (ax+b)

Find y - y

-3

6

-3

What is the sum of the deviations from the line?

Will it always be zero?

The line that minimizesminimizes the sum of the squares of the deviations from the

line is the LSRLLSRL.

Page 7: Least Squares Regression Lines

Slope:

For each unitunit increase in xx, there is an approximateapproximate increase/decreaseincrease/decrease of bb in yy.

Interpretations

Correlation coefficient:There is a direction, strength, direction, strength, and linear linear association between xx and yy.

Page 8: Least Squares Regression Lines

The ages (in months) and heights (in inches) of seven children are given.

x 16 24 42 60 75 102 120

y 24 30 35 40 48 56 60

Find the LSRL.

Interpret the slope and correlation coefficient in the context of the problem.

Page 9: Least Squares Regression Lines

Ans: r = .994,

Correlation coefficient:

Slope:For an increase in age of one monthage of one month, there is an approximate increaseincrease of .34 .34 inches in heights of children.inches in heights of children.

There is a strong, positive, linearstrong, positive, linear association between the age and age and height of childrenheight of children.

Page 10: Least Squares Regression Lines

The ages (in months) and heights (in inches) of seven children are given.

x 16 24 42 60 75 102 120

y 24 30 35 40 48 56 60

Predict the height of a child who is 4.5 years old. (4.5 yrs = 54 months)

Predict the height of someone who is 20 years old. (240 months)

Page 11: Least Squares Regression Lines

ExtrapolationExtrapolation• The LSRL should notshould not be used to

predict y for values of x outsideoutside the data set.

• It is unknown whether the pattern observed in the scatterplot continues outside this range.

Page 12: Least Squares Regression Lines

The ages (in months) and heights (in inches) of seven children are given.

The LSRL is

Can this equation be used to estimate the age of a child who is 50 inches tall?

Calculate: LinReg L2,L1LinReg L2,L1

40420342 ..ˆ xy

Do you get the same LSRL?

However, statisticians will always use this equation to predict x from y

For these data, this is the best equation to predict y from x.

198588892 ..ˆ xy

Page 13: Least Squares Regression Lines

The ages (in months) and heights (in inches) of seven children are given.

x 16 24 42 60 75 102 120

y 24 30 35 40 48 56 60

Calculate x & y.

Will this point always be on the LSRL?

Plot the point (x, y) on the LSRL.

62.71, 41.86

YES!

Page 14: Least Squares Regression Lines

The correlation coefficient and the LSRL are both non-resistantnon-resistant measures.

Page 15: Least Squares Regression Lines

Formulas – on chart

x

y

i

ii

s

srb

xbyb

xx

yyxxb

xbby

1

10

21

10ˆ

Page 16: Least Squares Regression Lines

The following statistics are found for the variables posted speed limit and the average number of accidents.

99814818

61140

.,.,

,.,

rsy

sx

y

x

Find: the LSRL & predict the number of accidents for a posted speed limit of 50 mph.

(Hint: Find b1, then b0, then LSRL)

Page 17: Least Squares Regression Lines

Predict the number of accidents for a posted speed limit of 50 mph.

accidents2325.ˆ y

Page 18: Least Squares Regression Lines

Homework:

• Packet page 64, “Linear Regression Activity”

• Packet page 68