A student wonders if tall women tend to date taller men than do short women. She measures herself,...

26
A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining rooms. Then she measures the next man each woman date. Draw & discuss the scatterplot and calculate the correlation coefficient. Women (x) Men (y) 66 72 64 68 66 70 65 68 70 71 65 65

Transcript of A student wonders if tall women tend to date taller men than do short women. She measures herself,...

Page 1: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining rooms. Then she measures the next man each woman date. Draw & discuss the scatterplot and calculate the correlation coefficient.

Women(x)

Men(y)

66 72

64 68

66 70

65 68

70 71

65 65

Page 2: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Linear Regression

Page 3: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Guess the correlation coefficient

http://istics.net/stat/Correlations/

Page 4: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Can we make a Line of Best Fit

Page 5: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Regression Line This is a line that describes how a response

variable (y) changes as an explanatory variable (x) changes.

It’s used to predict the value of (y) for a given value of (x).

Unlike correlation, regression requires that we have an explanatory variable.

Page 6: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Let’s try some!

http://illuminations.nctm.org/ActivityDetail.aspx?ID=146

Page 7: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Regression Line

 

Page 8: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

The 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 below 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.

ThousandMiles

Driven

Cost(dollars)

22 1799829 1645035 1499839 1399845 1459949 1498855 1359956 1459969 1199870 1445086 10998

10

12

14

16

18

ThousandMilesDriven20 30 40 50 60 70 80 90

Cost = 1.88e+04 - 86.2ThousandMilesDriven

Page 9: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

The regression line is shown below…. Use it to answer the following.

 

Slope:

Y-intercept:

Page 10: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Predict the price for a Honda with 50,000 miles.

 

Page 11: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Extrapolation

This refers to using a regression line for prediction far outside the interval of values of the explanatory variable x used to obtain the line.

They are not usually very accurate predictions.

Page 12: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

  Slope:

Y-int:

Predict weight after 16 wk

Predict weight at 2 years:

Page 13: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Residual

 

Page 14: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

The equation of the least-squares regression line for the sprint time and long-jump distance data is predicted long-jump distance = 304.56 – 27.3 (sprint time).

Find and interpret the residual for the student who had a sprint time of 8.09

seconds.

Page 15: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Regression

Let’s see how a regression line is calculated.

Page 16: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Fat vs Calories in BurgersFat (g) Calories

19 410

31 580

34 590

35 570

39 640

39 680

43 660

Page 17: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Let’s standardize the variables

Fat Cal z - x's z - y's

19 410 -1.959 -2

31 580 -0.42 -0.1

34 590 -0.036 0

35 570 0.09 -0.2

39 640 0.6 0.56

39 680 0.6 1

43 660 1.12 0.78

The line must contain the point and pass through the origin. ,x y

Page 18: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Let’s clarify a little. (Just watch & listen)

The equation for a line that passes through the origin can be written with just a slope & no intercept: y = mx.

But, we’re using z-scores so our equation should reflect this and thus it’s

Many lines with different slope pass through the origin. Which one fits our data the best? That is which slope determines the line that minimizes the sum of the squared residuals.

y xz mz

Page 19: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Line of Best Fit –Least Squares Regression Line

It’s the line for which the sum of the squared residuals is smallest. We want to find the mean squared residual.

Focus on the vertical deviations from the line.

Residual = Observed - Predicted

Page 20: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Let’s find it. (just watch & soak it in)

2

2

2 2 2

2 22

2

1

1

2

1

21 1 1

1 2

yy

y x

y x y x

y x y x

z zMSR

n

z mzMSR

n

z mz z m zMSR

nz z z z

MSR m mn n n

MSR mr m

since y xz mz

St. Dev of z scores is 1 so variance is 1 also.

This is r!

Page 21: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Continue……

Since this is a parabola – it reaches it’s minimum at 2

bx

a

This gives us(2 )

2(1)

rm r

Hence – the slope of the best fit line for z-scores is the correlation coefficient → r.

Page 22: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Slope – rise over run

A slope of r for z-scores means that for every increase of 1 standard deviation in , there is an increase of r standard deviations in . “Over 1 and up r”

Translate back to x & y values – “over one standard deviation in x, up r standard deviations in y.

Slope of the regression line is:

xz

yz

y

x

rsb

s

Page 23: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Why is correlation “r”

Because it was calculated from the regression of y on x after standardizing the variables – just like we have just done – thus he used r to stand for (standardized) regression.

Page 24: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

The number of miles (in thousands) for the 11 used Hondas have a mean of 50.5 and a standard deviation of 19.3. The asking prices had a mean of $14,425 and a standard deviation of $1,899. The correlation for these variables is r = -0.874. Find the equation of the least-squares regression line and explain what change in price we would expect for each additional 19.3 thousand miles.

Page 25: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

So let’s write the equation!

0

0 1

1

from algebra

y-intercept

slope

y mx b

by b b x

b

Fat (g) Calories

19 410

31 580

34 590

35 570

39 640

39 680

43 660

Slope:

Explain the slope:

Page 26: A student wonders if tall women tend to date taller men than do short women. She measures herself, her dormitory roommate, and the women in the adjoining.

Homework

Page 191 (27-32, 35, 37, 39, 41)