Docsity

Regression Analysis Lecture Notes: Scatterplots, Regression Lines, and Correlation - Prof., Study notes of Probability and Statistics

Partial preview of the text

Download Regression Analysis Lecture Notes: Scatterplots, Regression Lines, and Correlation - Prof. and more Study notes Probability and Statistics in PDF only on Docsity!

Math 243: Lecture File 4

N. Christopher Phillips

9 April 2009

Regression line: Example 2

The regression line depends on which variable is the explanatory variable. See Example 5.3 in the book for an example with real data. Here is a more dramatic example with fictitious data.

Data: (2, 4), (5, 10), (8, 4). (Again, just three points.)

0 2 4 6 8 10

2

4

6

8

10

12

Example 2 (continued)

Data: (2, 4), (5, 10), (8, 4). The correlation is r = 0.

Example 2 (continued)

Data: (2, 4), (5, 10), (8, 4). The correlation is r = 0. So the regression line has slope zero, and turns out to be

̂ y = 6.

Example 2 (continued)

Exchange the explanatory and response variables. The data was: (2, 4), (5, 10), (8, 4). It is now: (4, 2), (10, 5), (4, 8).

0 2 4 6 8 10 12

2

4

6

8

10

Example 2 (continued)

Data with explanatory and response variables switched: (4, 2), (10, 5), (4, 8).

Example 2 (continued)

Data with explanatory and response variables switched: (4, 2), (10, 5), (4, 8). The correlation is still r = 0. So the regression line again has slope zero, and turns out to be ̂ y = 5.

0 2 4 6 8 10 12

2

4

6

8

10

Example 2 (continued)

Data: (2, 4), (5, 10), (8, 4).

Both regression lines on the same plot, with the original choice of explanatory variable:

0 2 4 6 8 10

2

4

6

8

10

12

Regression lines for previously displayed scatterplots

Here are the scatterplots from the lecture of 7 April, with regression lines added. (Example 9, with its poor choice of scale on the vertical axis, has been omitted.)

Regression lines for previously displayed scatterplots

Here are the scatterplots from the lecture of 7 April, with regression lines added. (Example 9, with its poor choice of scale on the vertical axis, has been omitted.)

Observe that sometimes the line has little to do with the pattern in the scatterplot, and other times it is closely related.

Heights and weights of Math 243 students in Fall 2003

(continued)

The regression line fits the data reasonably well.

Correlation r ≈ 0. 675563

r 2 ≈ 0 .456386: The change in height explains about 46% of the change in weight.

Heights and UO GPAs of Math 243 students in Fall 2003

Scatterplot: height is x, GPA is y.

60 65 70 75 80

1

2

3

4

Regression line: ̂y ≈ 3. 84956 − 0. 0105858 x.

Example 1.

2 4 6 8 10 12 14

2

4

6

8

10

12

14

Clear positive association, roughly linear. Regression line: ̂y ≈ 1 .63308 + 0. 789497 x. Correlation r ≈ 0. 915883 r 2 ≈ 0 .838842: The change in x explains about 84% of the change in y.

Example 2.

2 4 6 8 10 12 14

2

4

6

8

10

12

14

Clear positive association, roughly linear, one outlier. (The other points are as in Example 1.)