least squares regression remember y = mx + b? it’s time for an upgrade… a regression line is a...

13
Least Squares Regression • Remember y = mx + b? It’s time for an upgrade… • A regression line is a line that describes how a response variable y changes as an explanatory variable x changes. We use a regression line to predict the value of y for a given

Upload: claribel-hodge

Post on 18-Jan-2016

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Least Squares Regression Remember y = mx + b? It’s time for an upgrade… A regression line is a line that describes how a response variable y changes as

Least Squares Regression• Remember y = mx + b? It’s time for an upgrade…

• A regression line is a line that describes how a response variable y changes as an explanatory variable x changes. We use a regression line to predict the value of y for a given value of x.

Page 2: Least Squares Regression Remember y = mx + b? It’s time for an upgrade… A regression line is a line that describes how a response variable y changes as

Does Fidgeting Keep You Slim?

Page 3: Least Squares Regression Remember y = mx + b? It’s time for an upgrade… A regression line is a line that describes how a response variable y changes as

• Identify x intercept & slope. Interpret each value in context.

Page 4: Least Squares Regression Remember y = mx + b? It’s time for an upgrade… A regression line is a line that describes how a response variable y changes as

• If a person’s NEA increases by 400 calories when she overeats, substitute x = 400 in the equation. The predicted fat gain is…..?

Page 5: Least Squares Regression Remember y = mx + b? It’s time for an upgrade… A regression line is a line that describes how a response variable y changes as

Notes:

• A small slope does not mean no relationship• YOU WILL LOSE CREDIT ON THE AP EXAM IF YOU

DO NOT NOTE THAT THE SLOPE IS A PREDICTION!!! (or estimate or expected or average)• “The fat gain will go down 0.00344 kg for each

added calorie of NEA” is NOT a correct statement!!

Page 6: Least Squares Regression Remember y = mx + b? It’s time for an upgrade… A regression line is a line that describes how a response variable y changes as

Why is it called “regression?”

• “Regression” means to go backward. Sir Francis Galton (1822-1911) looked at data on the heights of children vs the heights of their parents. He found that taller than average parents tended to have children who were also taller than average, but not as tall as their parents. Galton called this fact “regression toward the mean,” and the name came to be applied to the statistical method.

Page 7: Least Squares Regression Remember y = mx + b? It’s time for an upgrade… A regression line is a line that describes how a response variable y changes as

Extrapolation

• The use of a regression line for prediction far outside the interval of values of the explanatory variable x used to obtain the line. Such predictions are often not accurate.

Page 8: Least Squares Regression Remember y = mx + b? It’s time for an upgrade… A regression line is a line that describes how a response variable y changes as

Some data were collected on the weight of a male white laboratory rat for the first 25 weeks after its birth. A scatterplot of the weight (in grams) and time since birth (in weeks) shows a fairly strong, positive linear relationship. The linear regression equation models the data fairly well.Predicted weight= 100+40(weeks)• 1. What is the slope of the regression line? Explain what it means in

context.• 2. What’s the y intercept? Explain what it means in context.• 3. Predict the rat’s weight after 16 weeks. Show your work.• 4. Should you use this line to predict the rat’s weight at age 2 years? Use

the equation to make the prediction and think about the reasonableness of the result. (There are 454 grams in a pound.)

Page 9: Least Squares Regression Remember y = mx + b? It’s time for an upgrade… A regression line is a line that describes how a response variable y changes as

Used HondasThe following data shows the number of miles driven and advertised price for 11 used Honda CR-Vs from the 2002-2006 model years (prices found at www.carmax.com). The scatterplot shows a strong, negative linear association between number of miles and advertised cost. The correlation is -0.874. The line on the plot is the regression line for predicting advertised price based on number of miles.

SHOULD WE USE THE DATA TO PREDICT THE COST OF A USED HONDA WITH 250,000 MILES?

Page 10: Least Squares Regression Remember y = mx + b? It’s time for an upgrade… A regression line is a line that describes how a response variable y changes as

Residuals- think AP! (actual – predicted)

Page 11: Least Squares Regression Remember y = mx + b? It’s time for an upgrade… A regression line is a line that describes how a response variable y changes as

If a residual is….

• NEGATIVE- the line overpredicts the value

• POSITIVE- the line underpredicts the value

• 0- the line and the actual point take the same values

Page 12: Least Squares Regression Remember y = mx + b? It’s time for an upgrade… A regression line is a line that describes how a response variable y changes as

Residuals- find the residual for the hiker who weighted 187 lbs.

Page 13: Least Squares Regression Remember y = mx + b? It’s time for an upgrade… A regression line is a line that describes how a response variable y changes as

LSRL- Least Squares Regression Line

• The line that makes the sum of the squared residuals as small as possible