least-squares regression section 3.3. correlation measures the strength and direction of a linear...

22
Least-Squares Regression Section 3.3

Upload: stephon-arington

Post on 31-Mar-2015

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

Least-Squares

RegressionSection 3.3

Page 2: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

Correlation measures the strength and direction of a linear relationship between two variables.

How do we summarize the overall pattern of a linear relationship?

Draw a line!

Recall from 3.2:

Page 3: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize
Page 4: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

Least-Squares Regression

A method for finding a line that summarizes the relationship between two variables, but only in a specific setting.

Page 5: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

Regression Line “Best-fit Line”A straight line that descirbes how a response variable y changes as an explanatory variable x changes.

Predict y from x.

Requires that we have an explanatory variable and a response variable.

Page 6: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

Example 3.8, p. 150

Page 7: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

Least-Squares Regression LineBecause different people will draw different lines by eye on a scatterplot, we need a way to minimize the vertical distances.

Page 8: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

Least-Squares Regression LineThe LSRL of y on x is the line that makes the sum of the squares of the vertical distances of the data from the line as small as possible.

Page 9: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

Equation of LSRLFor data with explanatory variable x and response variable y for n individuals, find the means and standard deviations of each variable and their correlation. The least squares regression is the line

Page 10: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

Equation of LSRL

With slope:

And intercept:

Page 11: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

Facts about LSRL:

1. Slope: - The change of one std. dev. in x results in a change of r std. dev. in y.

2. x & y assignments matter.

3. LSRL will always go through

Page 12: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

LSRL in the Calculator

Page 13: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

LSRL in the CalculatorAfter you’ve entered data, STAT PLOT. ZoomStat (Zoom 9)

Page 14: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

LSRL in the CalculatorTo determine LSRL:Press STAT, CALC, 8:LinReg(a+bx), Enter

Page 15: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

LSRL in the CalculatorTo get the line to graph in your calculator:

Press STAT, CALC8:LinReg(a+bx) L1, L2, Y1

Now look in Y =. Then look at your graph.

Page 16: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

LSRL in the Calculator

Page 17: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

To plot the line on the scatterplot by hand:

Use the equation for for two values of x, one near each end of the range of x in data. Plot each point.

Page 18: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

For Example:Use the equation: .

Smallest x = 0, Largest x = 52

Use these two x-values to predict y.

Page 19: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

For Example:Use the equation: .

(0, 1.0892), (52, 10.9172)

To get another point, use STAT, CALC, 2:2-Var Stats. We can use .

Page 20: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

ExtrapolationSuppose that we have data on a child’s growth between 3 and 8 years of age. The least-squares regression line gives us the equation , where x represents the age of the child in years, and will be the predicted height in inches.

What if you wanted to predict the height of a 25 year old girl?

Would this equation be appropriate to use?

NO!

ˆ 30.8381 2.5142y x y

Page 21: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

ExtrapolationExtrapolation is the use of a regression line for prediction far outside the domain of values of the explanatory variable x that you used to obtain the line or curve. Such predictions are often not accurate.

That’s over 7’ 9” tall!

ˆ 30.8381 2.5142(25)y ˆ 93.6931y

Page 22: Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize

Practice Exercises

Exercises 3.40, 3.41 p. 157