Presentation is loading. Please wait.

Presentation is loading. Please wait.

Optical illusion ? Correlation ( r or R or  ) -- One-number summary of the strength of a relationship -- How to recognize -- How to compute Regressions.

Similar presentations


Presentation on theme: "Optical illusion ? Correlation ( r or R or  ) -- One-number summary of the strength of a relationship -- How to recognize -- How to compute Regressions."— Presentation transcript:

1 Optical illusion ? Correlation ( r or R or  ) -- One-number summary of the strength of a relationship -- How to recognize -- How to compute Regressions -- Any model has predicted values and residuals. (Do we always want a model with small residuals ? ) -- Regression lines --- how to use --- how to compute -- The “regression effect” (Why did Galton call these things “regressions” ? ) -- Pitfalls: Outliers -- Pitfalls: Extrapolation -- Conditions for a good regression

2 Which looks like a stronger relationship?

3 Optical Illusion ?

4 Kinds of Association… Positive vs. Negative Strong vs. Weak Linear vs. Non-linear

5 CORRELATION (or, the CORRELATION COEFFICIENT) measures the strength of a linear relationship. If the relationship is non-linear, it measures the strength of the linear part of the relationship. But then it doesn’t tell the whole story. Correlation can be positive or negative.

6 correlation =.97 correlation =.71

7 correlation = –.97 correlation = –.71 0 1 2 012 X Y 0 1 2 -202 X Y

8 correlation =.97 0 1 2 012 X Y

9 correlation =.24 correlation =.90

10 correlation =.50 correlation = 0

11 Computing correlation… 1.Replace each variable with its standardized version. 2.Take an “average” of ( x i ’ times y i ’ ):

12 Computing correlation r, or R, or greek  (rho) n-1 or n ? sum of all the products

13 Good things about correlation It’s symmetric ( correlation of x and y means same as correlation of y and x ) It doesn’t depend on scale or units — adding or multiplying either variable by a constant doesn’t change r — of course not; r depend only on the standardized versions r is always in the range from -1 to +1 +1 means perfect positive correlation; dots on line -1 means perfect negative correlation; dots on line 0 means no relationship, OR no linear relationship

14 Bad things about correlation Sensitive to outliers Misses non-linear relationships Doesn’t imply causality

15 Made-up Examples PERCENT TAKING SAT STATE AVE SCORE

16 Made-up Examples SHOE SIZE IQ

17 Made-up Examples BAKING TEMP JUDGE’S IMPRESSION 250 350 450

18 Made-up Examples GDP PER CAPITA LIFE EXPECTANCY

19 Observed Values, Predictions, and Residuals explanatory variable resp. var.

20 Observed Values, Predictions, and Residuals explanatory variable resp. var.

21 Observed Values, Predictions, and Residuals explanatory variable resp. var.

22 Observed Values, Predictions, and Residuals explanatory variable resp. var. Observed value Predicted value Residual = observed – predicted

23 Linear models and non-linear models Model A:Model B: y = a + bx + error y = a x 1/2 + error Model B has smaller errors. Is it a better model?

24 aa opas asl poasie ;aaslkf 4-9043578 y = 453209)_(*_n &*^(*LKH l;j;)(*&)(*& + error This model has even smaller errors. In fact, zero errors. Tradeoff: Small errors vs. complexity. (We’ll only consider linear models.)

25

26

27 About Lines y = mx + b b slope = m

28 About Lines y = mx + b y intercept slope b slope = m

29 About Lines y = mx + b b slope = m

30 About Lines y = mx + b y = b + mx b slope = m

31 About Lines y = mx + b y = b + mx y =  +  x y =  0 +  1 x

32 About Lines y = mx + b y = b + mx y =  +  x y =  0 +  1 x y = b 0 + b 1 x

33 About Lines y = mx + b y = b + mx y =  +  x y =  0 +  1 x y = b 0 + b 1 x y intercept slope b0b0 slope = b 1

34 About Lines y = mx + b y = b + mx y =  +  x y =  0 +  1 x y = b 0 + b 1 x y intercept slope b0b0 slope = b 1

35 Computing the best-fit line In STANDARDIZED scatterplot: -- goes through origin -- slope is r In ORIGINAL scatterplot: -- goes through “point of means” -- slope is r ×  Y   x

36 55.6854.7455.7386.89

37 The “Regression” Effect A preschool program attempts to boost children’s reading scores. Children are given a pre-test and a post-test. Pre-test: mean score ≈ 100, SD ≈ 10 Post-test:mean score ≈ 100, SD ≈ 10 The program seems to have no effect.

38 A closer look at the data shows a surprising result: Children who were below average on the pre-test tended to gain about 5-10 points on the post-test Children who were above average on the pre-test tended to lose about 5-10 points on the post-test.

39 A closer look at the data shows a surprising result: Children who were below average on the pre-test tended to gain about 5-10 points on the post-test Children who were above average on the pre-test tended to lose about 5-10 points on the post-test. Maybe we should provide the program only for children whose pre-test scores are below average?

40 Fact: In most test–retest and analogous situations, the bottom group on the first test will on average tend to improve, while the top group on the first test will on average tend to do worse. Other examples: Students who score high on the midterm tend on average to score high on the final, but not as high. An athlete who has a good rookie year tends to slump in his or her second year. (“Sophomore jinx”, "Sports Illustrated Jinx") Tall fathers tend to have sons who are tall, but not as tall. (Galton’s original example!)

41

42 It works the other way, too: Students who score high on the final tend to have scored high on the midterm, but not as high. Tall sons tend to have fathers who are tall, but not as tall. Students who did well on the post-test showed improvements, on average, of 5-10 points, while students who did poorly on the post-test dropped an average of 5-10 points.

43 Students can do well on the pretest… -- because they are good readers, or -- because they get lucky. The good readers, on average, do exactly as well on the post-test. The lucky group, on average, score lower. Students can get unlucky, too, but fewer of that group are among the high-scorers on the pre-test. So the top group on the pre-test, on average, tends to score a little lower on the post-test.

44 Extrapolation Interpolation: Using a model to estimate Y for an X value within the range on which the model was based. Extrapolation: Estimating based on an X value outside the range.

45 Extrapolation Interpolation: Using a model to estimate Y for an X value within the range on which the model was based. Extrapolation: Estimating based on an X value outside the range. Interpolation Good, Extrapolation Bad.

46 Nixon’s Graph: Economic Growth

47 Start of Nixon Adm.

48 Nixon’s Graph: Economic Growth Now Start of Nixon Adm.

49 Nixon’s Graph: Economic Growth Now Start of Nixon Adm. Projectio n

50 Conditions for regression “Straight enough” condition (linearity) Errors are mostly independent of X Errors are mostly independent of anything else you can think of Errors are more-or-less normally distributed

51 How to test the quality of a regression— Plot the residuals. Pattern bad, no pattern good R 2 How sure are you of the coefficients ?


Download ppt "Optical illusion ? Correlation ( r or R or  ) -- One-number summary of the strength of a relationship -- How to recognize -- How to compute Regressions."

Similar presentations


Ads by Google